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 -W -I$(COMMON) $(CDEFS)
15 # Perl script for config file conversion
18 # -----------------------------------------------------------------------------
19 # List of all object files
50 # -----------------------------------------------------------------------------
51 # List of all config includes
72 # -----------------------------------------------------------------------------
75 LIBS = $(COMMON)/common.a
81 ifeq (.depend,$(wildcard .depend))
86 @$(MAKE) -f make/gcc.mak all
91 ld65: $(INCS) $(OBJS) $(LIBS)
92 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
93 @if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
101 $(RM) *.o $(INCS) $(EXECS) .depend
104 # ------------------------------------------------------------------------------
105 # Make the dependencies
108 depend dep: $(OBJS:.o=.c)
109 @echo "Creating dependency information"
110 $(CC) -I$(COMMON) -MM -MG $^ > .depend
112 # -----------------------------------------------------------------------------
113 # Rules to make config includes
115 apple2.inc: cfg/apple2.cfg
116 @$(CVT) $< $@ CfgApple2
118 atari.inc: cfg/atari.cfg
119 @$(CVT) $< $@ CfgAtari
121 atmos.inc: cfg/atmos.cfg
122 @$(CVT) $< $@ CfgAtmos
133 c128.inc: cfg/c128.cfg
134 @$(CVT) $< $@ CfgC128
136 cbm510.inc: cfg/cbm510.cfg
137 @$(CVT) $< $@ CfgCBM510
139 cbm610.inc: cfg/cbm610.cfg
140 @$(CVT) $< $@ CfgCBM610
142 geos.inc: cfg/geos.cfg
143 @$(CVT) $< $@ CfgGeos
145 lunix.inc: cfg/lunix.cfg
146 @$(CVT) $< $@ CfgLunix
148 module.inc: cfg/module.cfg
149 @$(CVT) $< $@ CfgModule
154 none.inc: cfg/none.cfg
155 @$(CVT) $< $@ CfgNone
160 plus4.inc: cfg/plus4.cfg
161 @$(CVT) $< $@ CfgPlus4
163 supervision.inc: cfg/supervision.cfg
164 @$(CVT) $< $@ CfgSupervision
166 vic20.inc: cfg/vic20.cfg
167 @$(CVT) $< $@ CfgVic20