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 -I$(COMMON) $(CDEFS)
15 # Perl script for config file conversion
18 # -----------------------------------------------------------------------------
19 # List of all object files
45 # -----------------------------------------------------------------------------
46 # List of all config includes
59 # -----------------------------------------------------------------------------
62 LIBS = $(COMMON)/common.a
68 ifeq (.depend,$(wildcard .depend))
73 @$(MAKE) -f make/gcc.mak all
78 ld65: $(INCS) $(OBJS) $(LIBS)
79 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
80 @if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
88 rm -f *.o $(INCS) $(EXECS) .depend
91 # ------------------------------------------------------------------------------
92 # Make the dependencies
95 depend dep: $(OBJS:.o=.c)
96 @echo "Creating dependency information"
97 $(CC) -I$(COMMON) -MM -MG $^ > .depend
99 # -----------------------------------------------------------------------------
100 # Rules to make config includes
102 apple2.inc: cfg/apple2.cfg
103 @$(CVT) $< $@ CfgApple2
105 atari.inc: cfg/atari.cfg
106 @$(CVT) $< $@ CfgAtari
114 c128.inc: cfg/c128.cfg
115 @$(CVT) $< $@ CfgC128
117 cbm610.inc: cfg/cbm610.cfg
118 @$(CVT) $< $@ CfgCBM610
120 geos.inc: cfg/geos.cfg
121 @$(CVT) $< $@ CfgGeos
123 none.inc: cfg/none.cfg
124 @$(CVT) $< $@ CfgNone
129 plus4.inc: cfg/plus4.cfg
130 @$(CVT) $< $@ CfgPlus4