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
73 # -----------------------------------------------------------------------------
76 LIBS = $(COMMON)/common.a
82 ifeq (.depend,$(wildcard .depend))
87 @$(MAKE) -f make/gcc.mak all
92 ld65: $(INCS) $(OBJS) $(LIBS)
93 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
94 @if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
102 $(RM) *.o $(INCS) $(EXECS) .depend
105 # ------------------------------------------------------------------------------
106 # Make the dependencies
109 depend dep: $(OBJS:.o=.c)
110 @echo "Creating dependency information"
111 $(CC) -I$(COMMON) -MM -MG $^ > .depend
113 # -----------------------------------------------------------------------------
114 # Rules to make config includes
116 apple2.inc: cfg/apple2.cfg
117 @$(CVT) $< $@ CfgApple2
119 # The apple2enh target uses the same config as the apple2
120 apple2enh.inc: cfg/apple2.cfg
121 @$(CVT) $< $@ CfgApple2Enh
123 atari.inc: cfg/atari.cfg
124 @$(CVT) $< $@ CfgAtari
126 atmos.inc: cfg/atmos.cfg
127 @$(CVT) $< $@ CfgAtmos
138 c128.inc: cfg/c128.cfg
139 @$(CVT) $< $@ CfgC128
141 cbm510.inc: cfg/cbm510.cfg
142 @$(CVT) $< $@ CfgCBM510
144 cbm610.inc: cfg/cbm610.cfg
145 @$(CVT) $< $@ CfgCBM610
147 geos.inc: cfg/geos.cfg
148 @$(CVT) $< $@ CfgGeos
150 lunix.inc: cfg/lunix.cfg
151 @$(CVT) $< $@ CfgLunix
153 module.inc: cfg/module.cfg
154 @$(CVT) $< $@ CfgModule
159 none.inc: cfg/none.cfg
160 @$(CVT) $< $@ CfgNone
165 plus4.inc: cfg/plus4.cfg
166 @$(CVT) $< $@ CfgPlus4
168 supervision.inc: cfg/supervision.cfg
169 @$(CVT) $< $@ CfgSupervision
171 vic20.inc: cfg/vic20.cfg
172 @$(CVT) $< $@ CfgVic20