Skip to content

Instantly share code, notes, and snippets.

@msikma
Created October 3, 2015 21:09
Show Gist options
  • Save msikma/778e3d5e3ba32a8ba42e to your computer and use it in GitHub Desktop.
Save msikma/778e3d5e3ba32a8ba42e to your computer and use it in GitHub Desktop.
CC = $(DJGPP_CC)
VENDOR = vendor
CFLAGS =
LDFLAGS =
BIN = game1.exe
SRCDIR = src
OBJDIR = obj
DISTDIR = dist
SOURCES = $(shell find $(SRCDIR) -name "*.c") $(shell find $(VENDOR) -name "*.c" -not -path "$(VENDOR)/allegro5/*" -not -name "test_*.c")
OBJS = $(SOURCES:%.c=%.o)
default: all
%.o: %.c
${CC} -c -o $@ $? ${CFLAGS}
all: ${OBJS}
${CC} -o ${DISTDIR}/${BIN} $+ ${LDFLAGS}
clean:
rm -f ${OBJS}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment