VPATH = . ..\..\common\cdrom ..\..\common\sound
CPP  = g++.exe
CC   = gcc.exe
OBJ  = mitsumi.o ultimatecdrom.o cdrom-windows-ioctl.o sound_out_sdl2.o
LIBS = -lwinmm -lSDL2
CFLAGS = $(INCS) -DBUILDING_DLL=1 -I..\..\..\src -I..\..\common\cdrom -I..\..\common\sound -O3

all: ultimatecdrom.dll

clean:
	rm *.o
	rm *.dll

DEFFILE=libultimatecdrom.def
STATICLIB=libultimatecdrom.a

ultimatecdrom.dll: $(OBJ)
	$(CC) -o ultimatecdrom.dll -s -shared $(OBJ) $(LIBS) -Wl,--subsystem,windows

%.o: %.c
	$(CC) $(CFLAGS) -c $<
