2 # gcc Makefile for ca65
5 # ------------------------------------------------------------------------------
7 # The executable to build
13 # Several search paths. You may redefine these on the command line
14 CA65_INC = \"/usr/lib/cc65/asminc/\"
16 CFLAGS = -g -O2 -Wall -W -std=c89
18 CFLAGS += -DCA65_INC=$(CA65_INC)
23 # Perl script for macro file conversion
24 CVT=macpack/cvt-mac.pl
26 # -----------------------------------------------------------------------------
27 # List of all object files
70 # -----------------------------------------------------------------------------
71 # List of all macro files
79 LIBS = $(COMMON)/common.a
81 # ------------------------------------------------------------------------------
84 # Main target - must be first
86 ifeq (.depend,$(wildcard .depend))
91 @$(MAKE) -f make/gcc.mak all
94 $(EXE): $(INCS) $(OBJS) $(LIBS)
95 $(CC) $(OBJS) $(LIBS) $(LDFLAGS) -o $@
96 @if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
101 $(RM) *~ core.* *.map
104 $(RM) *.o $(EXE) $(INCS) .depend
106 # ------------------------------------------------------------------------------
107 # Make the dependencies
110 depend dep: $(OBJS:.o=.c)
111 @echo "Creating dependency information"
112 $(CC) $(CFLAGS) -MM -MG $^ > .depend
114 # -----------------------------------------------------------------------------
115 # Rules to make config includes
117 atari.inc: macpack/atari.mac
118 @$(CVT) $< $@ MacAtari
120 cbm.inc: macpack/cbm.mac
123 cpu.inc: macpack/cpu.mac
126 generic.inc: macpack/generic.mac
127 @$(CVT) $< $@ MacGeneric
129 longbranch.inc: macpack/longbranch.mac
130 @$(CVT) $< $@ MacLongBranch