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
56 # -----------------------------------------------------------------------------
59 LIBS = $(COMMON)/common.a
65 ifeq (.depend,$(wildcard .depend))
70 @$(MAKE) -f make/gcc.mak all
75 ld65: $(INCS) $(OBJS) $(LIBS)
76 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
84 rm -f *.o $(INCS) $(EXECS) .depend
87 # ------------------------------------------------------------------------------
88 # Make the dependencies
91 depend dep: $(OBJS:.o=.c)
92 @echo "Creating dependency information"
93 $(CC) -I$(COMMON) -MM -MG $^ > .depend
95 # -----------------------------------------------------------------------------
96 # Rules to make config includes
98 apple2.inc: cfg/apple2.cfg
99 @$(CVT) $< $@ CfgApple2
101 atari.inc: cfg/atari.cfg
102 @$(CVT) $< $@ CfgAtari
110 c128.inc: cfg/c128.cfg
111 @$(CVT) $< $@ CfgC128
113 cbm610.inc: cfg/cbm610.cfg
114 @$(CVT) $< $@ CfgCBM610
116 geos.inc: cfg/geos.cfg
117 @$(CVT) $< $@ CfgGeos
119 none.inc: cfg/none.cfg
120 @$(CVT) $< $@ CfgNone
125 plus4.inc: cfg/plus4.cfg
126 @$(CVT) $< $@ CfgPlus4