2 # gcc Makefile for ld65
8 # Default for the compiler lib search path as compiler define
9 CDEFS=-DCC65_LIB=\"/usr/lib/cc65/lib/\"
10 CFLAGS = -g -O2 -Wall -I$(COMMON) $(CDEFS)
14 # Perl script for config file conversion
17 # -----------------------------------------------------------------------------
18 # List of all object files
42 # -----------------------------------------------------------------------------
43 # List of all config includes
55 # -----------------------------------------------------------------------------
58 LIBS = $(COMMON)/common.a
64 ifeq (.depend,$(wildcard .depend))
69 @$(MAKE) -f make/gcc.mak all
74 ld65: $(INCS) $(OBJS) $(LIBS)
75 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
83 rm -f *.o $(INCS) $(EXECS) .depend
86 # ------------------------------------------------------------------------------
87 # Make the dependencies
90 depend dep: $(OBJS:.o=.c)
91 @echo "Creating dependency information"
92 $(CC) -I$(COMMON) -MM -MG $^ > .depend
94 # -----------------------------------------------------------------------------
95 # Rules to make config includes
97 apple2.inc: cfg/apple2.cfg
98 @$(CVT) $< $@ CfgApple2
100 atari.inc: cfg/atari.cfg
101 @$(CVT) $< $@ CfgAtari
106 c128.inc: cfg/c128.cfg
107 @$(CVT) $< $@ CfgC128
109 cbm610.inc: cfg/cbm610.cfg
110 @$(CVT) $< $@ CfgCBM610
112 geos.inc: cfg/geos.cfg
113 @$(CVT) $< $@ CfgGeos
115 none.inc: cfg/none.cfg
116 @$(CVT) $< $@ CfgNone
121 plus4.inc: cfg/plus4.cfg
122 @$(CVT) $< $@ CfgPlus4