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)
14 # Perl script for config file conversion
17 # -----------------------------------------------------------------------------
18 # List of all object files
41 # -----------------------------------------------------------------------------
42 # List of all config includes
54 # -----------------------------------------------------------------------------
57 LIBS = $(COMMON)/common.a
63 ifeq (.depend,$(wildcard .depend))
68 @$(MAKE) -f make/gcc.mak all
73 ld65: $(INCS) $(OBJS) $(LIBS)
74 $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
80 rm -f *.o $(INCS) $(EXECS) .depend
83 # ------------------------------------------------------------------------------
84 # Make the dependencies
87 depend dep: $(OBJS:.o=.c)
88 @echo "Creating dependency information"
89 $(CC) -I$(COMMON) -MM -MG $^ > .depend
91 # -----------------------------------------------------------------------------
92 # Rules to make config includes
94 apple2.inc: cfg/apple2.cfg
95 @$(CVT) $< $@ CfgApple2
97 atari.inc: cfg/atari.cfg
98 @$(CVT) $< $@ CfgAtari
103 c128.inc: cfg/c128.cfg
104 @$(CVT) $< $@ CfgC128
106 cbm610.inc: cfg/cbm610.cfg
107 @$(CVT) $< $@ CfgCBM610
109 geos.inc: cfg/geos.cfg
110 @$(CVT) $< $@ CfgGeos
112 none.inc: cfg/none.cfg
113 @$(CVT) $< $@ CfgNone
118 plus4.inc: cfg/plus4.cfg
119 @$(CVT) $< $@ CfgPlus4