# Makefile for VgaGames: extlib/iolib/SDL3/

HOBJ = defsyms.h symbols.h
OOBJ = initdest.o input.o window.o audio.o image.o

SDL3_CFLAGS = `$(IOLIB_SCRIPT) SDL3 --cflags`
SDL3_LIB = `$(IOLIB_SCRIPT) SDL3 --lib`


all: $(OOBJ)

clean:
	rm -f $(OOBJ)


initdest.o: initdest.c $(HOBJ)
	$(CC) $(CFLAGS) $(SDL3_CFLAGS) $(SOFLAGS) -DIOLIB_LOADLIB="\"$(SDL3_LIB)\"" -c initdest.c

input.o: input.c $(HOBJ) ../../../input/input.h
	$(CC) $(CFLAGS) $(SDL3_CFLAGS) $(SOFLAGS) -c input.c

window.o: window.c $(HOBJ) ../../../window/window.h ../../../image/image.h ../../../image/pixmod.h
	$(CC) $(CFLAGS) $(SDL3_CFLAGS) $(SOFLAGS) -c window.c

audio.o: audio.c $(HOBJ) ../../../audio/audio.h
	$(CC) $(CFLAGS) $(SDL3_CFLAGS) $(SOFLAGS) -c audio.c

image.o: image.c $(HOBJ) ../../../image/image.h
	$(CC) $(CFLAGS) $(SDL3_CFLAGS) $(SOFLAGS) -c image.c

