]> git.sur5r.net Git - cc65/blob - src/da65/make/gcc.mak
Allow conditional directives within .STRUCT7:UNION and .ENUM
[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 =  attrtab.o       \
14         code.o          \
15         data.o          \
16         error.o         \
17         global.o        \
18         handler.o       \
19         infofile.o      \
20         main.o          \
21         opc6502.o       \
22         opc65816.o      \
23         opc65c02.o      \
24         opc65sc02.o     \
25         opctable.o      \
26         output.o        \
27         scanner.o
28
29 LIBS = $(COMMON)/common.a
30
31
32 EXECS = da65
33
34 .PHONY: all
35 ifeq (.depend,$(wildcard .depend))
36 all : $(EXECS)
37 include .depend
38 else
39 all:    depend
40         @$(MAKE) -f make/gcc.mak all
41 endif
42
43
44
45 da65:   $(OBJS) $(LIBS)
46         $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
47         @if [ $(OS2_SHELL) ] ;  then $(EBIND) $@ ; fi
48
49 clean:
50         $(RM) *~ core *.map
51
52 zap:    clean
53         $(RM) *.o $(EXECS) .depend
54
55
56 # ------------------------------------------------------------------------------
57 # Make the dependencies
58
59 .PHONY: depend dep
60 depend dep:     $(OBJS:.o=.c)
61         @echo "Creating dependency information"
62         $(CC) -I$(COMMON) -MM $^ > .depend
63
64