]> git.sur5r.net Git - cc65/blob - src/da65/make/gcc.mak
New info file statement "asminc" that allows to read in a file containing
[cc65] / src / da65 / make / gcc.mak
1 #
2 # gcc Makefile for da65
3 #
4
5 # Library dir
6 COMMON  = ../common
7
8 CFLAGS = -g -O2 -Wall -W -I$(COMMON)
9 CC=gcc
10 EBIND=emxbind
11 LDFLAGS=
12
13 OBJS =  asminc.o        \
14         attrtab.o       \
15         code.o          \
16         data.o          \
17         error.o         \
18         global.o        \
19         handler.o       \
20         infofile.o      \
21         main.o          \
22         opc6502.o       \
23         opc65816.o      \
24         opc65c02.o      \
25         opc65sc02.o     \
26         opctable.o      \
27         output.o        \
28         scanner.o
29
30 LIBS = $(COMMON)/common.a
31
32
33 EXECS = da65
34
35 .PHONY: all
36 ifeq (.depend,$(wildcard .depend))
37 all : $(EXECS)
38 include .depend
39 else
40 all:    depend
41         @$(MAKE) -f make/gcc.mak all
42 endif
43
44
45
46 da65:   $(OBJS) $(LIBS)
47         $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
48         @if [ $(OS2_SHELL) ] ;  then $(EBIND) $@ ; fi
49
50 clean:
51         $(RM) *~ core *.map
52
53 zap:    clean
54         $(RM) *.o $(EXECS) .depend
55
56
57 # ------------------------------------------------------------------------------
58 # Make the dependencies
59
60 .PHONY: depend dep
61 depend dep:     $(OBJS:.o=.c)
62         @echo "Creating dependency information"
63         $(CC) -I$(COMMON) -MM $^ > .depend
64
65