]> git.sur5r.net Git - cc65/blob - src/common/make/gcc.mak
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / src / common / make / gcc.mak
1 #
2 # gcc Makefile for the binutils common stuff
3 #
4
5 CFLAGS  = -g -O2 -Wall
6 CC      = gcc
7 LDFLAGS =
8 LIB     = common.a
9
10
11
12 OBJS =  bitops.o        \
13         hashstr.o
14
15
16 # ------------------------------------------------------------------------------
17 # Dummy targets
18
19 .PHONY: all
20 ifeq (.depend,$(wildcard .depend))
21 all:    lib
22 include .depend
23 else
24 all:    depend
25         @$(MAKE) -f make/gcc.mak all
26 endif
27
28 .PHONY: lib
29 lib:    $(LIB)
30
31 $(LIB): $(OBJS)
32         $(AR) rs $(LIB) $?
33
34 clean:
35         rm -f *~ core *.map
36
37 zap:    clean
38         rm -f *.o $(LIB) .depend
39
40 # ------------------------------------------------------------------------------
41 # Make the dependencies
42
43 .PHONY: depend dep
44 depend dep:     $(OBJS:.o=.c)
45         @echo "Creating dependency information"
46         $(CC) -MM $^ > .depend
47
48