VPATH = . ..\..\common\adc ..\..\common\joystick ..\..\common\misc
CPP  = g++.exe
CC   = gcc.exe
OBJ  = morley_uap.o joystick_sdl2.o d7002c.o 6522.o
LIBS = -lwinmm -lSDL2main -lSDL2
CFLAGS = $(INCS) -DBUILDING_DLL=1 -I..\..\..\src -I..\..\common\adc -I..\..\common\joystick -I..\..\common\misc -O3

all: morley_uap.dll

clean:
	rm *.o
	rm *.dll

DEFFILE=libmorley_uap.def
STATICLIB=libmorley_uap.a

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

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