2 # gcc Makefile for ld65
8 # The linker library search path. Default is "/usr/lib/cc65/lib/" if nothing
9 # is defined. You may use CC65_LIB=foo on the command line to override it.
10 CC65_LIB = \"/usr/lib/cc65/lib/\"
13 CFLAGS = -g -O2 -Wall -W -I$(COMMON) -DCC65_LIB=$(CC65_LIB)
18 # Perl script for config file conversion
21 # -----------------------------------------------------------------------------
22 # List of all object files
53 # -----------------------------------------------------------------------------
54 # List of all config includes
77 # -----------------------------------------------------------------------------
80 LIBS = $(COMMON)/common.a
86 ifeq (.depend,$(wildcard .depend))
91 @$(MAKE) -f make/gcc.mak all
96 ld65: $(INCS) $(OBJS) $(LIBS)
97 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
98 @if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
106 $(RM) *.o $(INCS) $(EXECS) .depend
109 # ------------------------------------------------------------------------------
110 # Make the dependencies
113 depend dep: $(OBJS:.o=.c)
114 @echo "Creating dependency information"
115 $(CC) -I$(COMMON) -MM -MG $^ > .depend
117 # -----------------------------------------------------------------------------
118 # Rules to make config includes
120 apple2.inc: cfg/apple2.cfg
121 @$(CVT) $< $@ CfgApple2
123 # The apple2enh target uses the same config as the apple2
124 apple2enh.inc: cfg/apple2.cfg
125 @$(CVT) $< $@ CfgApple2Enh
127 atari.inc: cfg/atari.cfg
128 @$(CVT) $< $@ CfgAtari
130 atmos.inc: cfg/atmos.cfg
131 @$(CVT) $< $@ CfgAtmos
142 c128.inc: cfg/c128.cfg
143 @$(CVT) $< $@ CfgC128
145 cbm510.inc: cfg/cbm510.cfg
146 @$(CVT) $< $@ CfgCBM510
148 cbm610.inc: cfg/cbm610.cfg
149 @$(CVT) $< $@ CfgCBM610
151 geos.inc: cfg/geos.cfg
152 @$(CVT) $< $@ CfgGeos
154 lunix.inc: cfg/lunix.cfg
155 @$(CVT) $< $@ CfgLunix
157 lynx.inc: cfg/lynx.cfg
158 @$(CVT) $< $@ CfgLynx
160 module.inc: cfg/module.cfg
161 @$(CVT) $< $@ CfgModule
166 none.inc: cfg/none.cfg
167 @$(CVT) $< $@ CfgNone
172 plus4.inc: cfg/plus4.cfg
173 @$(CVT) $< $@ CfgPlus4
175 supervision.inc: cfg/supervision.cfg
176 @$(CVT) $< $@ CfgSupervision
178 vic20.inc: cfg/vic20.cfg
179 @$(CVT) $< $@ CfgVic20