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
49 # -----------------------------------------------------------------------------
50 # List of all config includes
70 # -----------------------------------------------------------------------------
73 LIBS = $(COMMON)/common.a
79 ifeq (.depend,$(wildcard .depend))
84 @$(MAKE) -f make/gcc.mak all
89 ld65: $(INCS) $(OBJS) $(LIBS)
90 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
91 @if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
99 $(RM) *.o $(INCS) $(EXECS) .depend
102 # ------------------------------------------------------------------------------
103 # Make the dependencies
106 depend dep: $(OBJS:.o=.c)
107 @echo "Creating dependency information"
108 $(CC) -I$(COMMON) -MM -MG $^ > .depend
110 # -----------------------------------------------------------------------------
111 # Rules to make config includes
113 apple2.inc: cfg/apple2.cfg
114 @$(CVT) $< $@ CfgApple2
116 atari.inc: cfg/atari.cfg
117 @$(CVT) $< $@ CfgAtari
119 atmos.inc: cfg/atmos.cfg
120 @$(CVT) $< $@ CfgAtmos
131 c128.inc: cfg/c128.cfg
132 @$(CVT) $< $@ CfgC128
134 cbm510.inc: cfg/cbm510.cfg
135 @$(CVT) $< $@ CfgCBM510
137 cbm610.inc: cfg/cbm610.cfg
138 @$(CVT) $< $@ CfgCBM610
140 geos.inc: cfg/geos.cfg
141 @$(CVT) $< $@ CfgGeos
143 lunix.inc: cfg/lunix.cfg
144 @$(CVT) $< $@ CfgLunix
146 module.inc: cfg/module.cfg
147 @$(CVT) $< $@ CfgModule
152 none.inc: cfg/none.cfg
153 @$(CVT) $< $@ CfgNone
158 plus4.inc: cfg/plus4.cfg
159 @$(CVT) $< $@ CfgPlus4
161 vic20.inc: cfg/vic20.cfg
162 @$(CVT) $< $@ CfgVic20