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
46 # -----------------------------------------------------------------------------
47 # List of all config includes
64 # -----------------------------------------------------------------------------
67 LIBS = $(COMMON)/common.a
73 ifeq (.depend,$(wildcard .depend))
78 @$(MAKE) -f make/gcc.mak all
83 ld65: $(INCS) $(OBJS) $(LIBS)
84 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
85 @if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
93 rm -f *.o $(INCS) $(EXECS) .depend
96 # ------------------------------------------------------------------------------
97 # Make the dependencies
100 depend dep: $(OBJS:.o=.c)
101 @echo "Creating dependency information"
102 $(CC) -I$(COMMON) -MM -MG $^ > .depend
104 # -----------------------------------------------------------------------------
105 # Rules to make config includes
107 apple2.inc: cfg/apple2.cfg
108 @$(CVT) $< $@ CfgApple2
110 atari.inc: cfg/atari.cfg
111 @$(CVT) $< $@ CfgAtari
113 atmos.inc: cfg/atmos.cfg
114 @$(CVT) $< $@ CfgAtmos
122 c128.inc: cfg/c128.cfg
123 @$(CVT) $< $@ CfgC128
125 cbm510.inc: cfg/cbm510.cfg
126 @$(CVT) $< $@ CfgCBM510
128 cbm610.inc: cfg/cbm610.cfg
129 @$(CVT) $< $@ CfgCBM610
131 geos.inc: cfg/geos.cfg
132 @$(CVT) $< $@ CfgGeos
134 lunix.inc: cfg/lunix.cfg
135 @$(CVT) $< $@ CfgLunix
137 module.inc: cfg/module.cfg
138 @$(CVT) $< $@ CfgModule
140 none.inc: cfg/none.cfg
141 @$(CVT) $< $@ CfgNone
146 plus4.inc: cfg/plus4.cfg
147 @$(CVT) $< $@ CfgPlus4