2 # gcc Makefile for da65
5 # ------------------------------------------------------------------------------
7 # The executable to build
15 CFLAGS = -g -O2 -Wall -W -std=c89
16 override CFLAGS += -I$(COMMON)
21 # -----------------------------------------------------------------------------
22 # List of all object files
47 LIBS = $(COMMON)/common.a
50 # ------------------------------------------------------------------------------
53 # Main target - must be first
55 ifeq (.depend,$(wildcard .depend))
60 @$(MAKE) -f make/gcc.mak all
63 $(EXE): $(OBJS) $(LIBS)
64 $(CC) $(LDFLAGS) $^ -o $@
65 @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
71 $(RM) *.o $(EXE) .depend
73 # ------------------------------------------------------------------------------
74 # Make the dependencies
77 depend dep: $(OBJS:.o=.c)
78 @echo "Creating dependency information"
79 $(CC) $(CFLAGS) -MM $^ > .depend