2 # gcc Makefile for ar65
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
37 LIBS = $(COMMON)/common.a
40 # ------------------------------------------------------------------------------
43 # Main target - must be first
45 ifeq (.depend,$(wildcard .depend))
50 @$(MAKE) -f make/gcc.mak all
53 $(EXE): $(OBJS) $(LIBS)
54 $(CC) $(LDFLAGS) $^ -o $@
55 @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
61 $(RM) *.o $(EXE) .depend
63 # ------------------------------------------------------------------------------
64 # Make the dependencies
67 depend dep: $(OBJS:.o=.c)
68 @echo "Creating dependency information"
69 $(CC) $(CFLAGS) -MM $^ > .depend