CC = i686-pc-msdosdjgpp-gcc
CFLAGS = -march=i486 -mtune=i486

SRCDIR := src
BINARY := gooble.exe

SRCS := $(wildcard $(SRCDIR)/*.c)
OBJS := $(patsubst %.c,%.o,$(SRCS))

DEPS := $(OBJS:%.o=%.d)

$(BINARY): $(OBJS)
	@echo [Linking $@]
	$(CC) -o bin/$@ $(CFLAGS) $(OBJS)

%.o: %.c
	@echo [Compiling $<]
	$(CC) -c -o $@ $(CFLAGS) $<

clean:
	rm -f $(SRCDIR)/*.o
	rm -f build/$(BINARY)
	rm -f *.bin

mkcd:
	xorriso -outdev ./gooble.bin -blank as_needed -map bin / -map assets /assets -volid "GOOBLECD"
