2 # gcc Makefile for sim65
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
40 LIBS = $(COMMON)/common.a
42 # ------------------------------------------------------------------------------
45 # Main target - must be first
47 ifeq (.depend,$(wildcard .depend))
52 @$(MAKE) -f make/gcc.mak all
55 $(EXE): $(OBJS) $(LIBS)
56 $(CC) $(LDFLAGS) $^ -o $@
57 @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
61 @$(MAKE) -C chips -f make/gcc.mak
67 $(RM) *.o $(EXE) .depend
69 # ------------------------------------------------------------------------------
70 # Make the dependencies
73 depend dep: $(OBJS:.o=.c)
74 @echo "Creating dependency information"
75 $(CC) $(CFLAGS) -MM $^ > .depend