]> git.sur5r.net Git - cc65/blob - src/ar65/make/gcc.mak
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / src / ar65 / make / gcc.mak
1 #
2 # gcc Makefile for ar65
3 #
4
5 CFLAGS  = -g -O2 -Wall
6 CC      = gcc
7 LDFLAGS =
8
9 OBJS =  add.o           \
10         del.o           \
11         error.o         \
12         exports.o       \
13         extract.o       \
14         fileio.o        \
15         global.o        \
16         library.o       \
17         list.o          \
18         main.o          \
19         mem.o           \
20         objdata.o       \
21         objfile.o
22
23 LIBS = ../common/common.a
24
25
26 EXECS = ar65
27
28 .PHONY: all
29 ifeq (.depend,$(wildcard .depend))
30 all : $(EXECS)
31 include .depend
32 else
33 all:    depend
34         @$(MAKE) -f make/gcc.mak all
35 endif
36
37
38
39 ar65:   $(OBJS) $(LIBS)
40         $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
41
42 clean:
43         rm -f *~ core
44
45 zap:    clean
46         rm -f *.o $(EXECS) .depend
47
48 # ------------------------------------------------------------------------------
49 # Make the dependencies
50
51 .PHONY: depend dep
52 depend dep:     $(OBJS:.o=.c)
53         @echo "Creating dependency information"
54         $(CC) -MM $^ > .depend
55
56