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
54 # -----------------------------------------------------------------------------
55 # List of all config includes
78 # -----------------------------------------------------------------------------
81 LIBS = $(COMMON)/common.a
87 ifeq (.depend,$(wildcard .depend))
92 @$(MAKE) -f make/gcc.mak all
97 ld65: $(INCS) $(OBJS) $(LIBS)
98 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
99 @if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
107 $(RM) *.o $(INCS) $(EXECS) .depend
110 # ------------------------------------------------------------------------------
111 # Make the dependencies
114 depend dep: $(OBJS:.o=.c)
115 @echo "Creating dependency information"
116 $(CC) -I$(COMMON) -MM -MG $^ > .depend
118 # -----------------------------------------------------------------------------
119 # Rules to make config includes
121 apple2.inc: cfg/apple2.cfg
122 @$(CVT) $< $@ CfgApple2
124 # The apple2enh target uses the same config as the apple2
125 apple2enh.inc: cfg/apple2.cfg
126 @$(CVT) $< $@ CfgApple2Enh
128 atari.inc: cfg/atari.cfg
129 @$(CVT) $< $@ CfgAtari
131 atmos.inc: cfg/atmos.cfg
132 @$(CVT) $< $@ CfgAtmos
143 c128.inc: cfg/c128.cfg
144 @$(CVT) $< $@ CfgC128
146 cbm510.inc: cfg/cbm510.cfg
147 @$(CVT) $< $@ CfgCBM510
149 cbm610.inc: cfg/cbm610.cfg
150 @$(CVT) $< $@ CfgCBM610
152 geos.inc: cfg/geos.cfg
153 @$(CVT) $< $@ CfgGeos
155 lunix.inc: cfg/lunix.cfg
156 @$(CVT) $< $@ CfgLunix
158 lynx.inc: cfg/lynx.cfg
159 @$(CVT) $< $@ CfgLynx
161 module.inc: cfg/module.cfg
162 @$(CVT) $< $@ CfgModule
167 none.inc: cfg/none.cfg
168 @$(CVT) $< $@ CfgNone
173 plus4.inc: cfg/plus4.cfg
174 @$(CVT) $< $@ CfgPlus4
176 supervision.inc: cfg/supervision.cfg
177 @$(CVT) $< $@ CfgSupervision
179 vic20.inc: cfg/vic20.cfg
180 @$(CVT) $< $@ CfgVic20