]> git.sur5r.net Git - cc65/blob - src/common/make/gcc.mak
Converted the makefile to use wine under Linux
[cc65] / src / common / make / gcc.mak
1 #
2 # gcc Makefile for the binutils common stuff
3 #
4
5 CFLAGS  = -g -O2 -Wall -W
6 CC      = gcc
7 LDFLAGS =
8 LIB     = common.a
9
10
11
12 OBJS =  abend.o         \
13         bitops.o        \
14         chartype.o      \
15         check.o         \
16         cmdline.o       \
17         coll.o          \
18         cpu.o           \
19         debugflag.o     \
20         exprdefs.o      \
21         filepos.o       \
22         filetype.o      \
23         fname.o         \
24         hashstr.o       \
25         hashtab.o       \
26         matchpat.o      \
27         print.o         \
28         searchpath.o    \
29         segdefs.o       \
30         segnames.o      \
31         strbuf.o        \
32         strpool.o       \
33         strutil.o       \
34         target.o        \
35         tgttrans.o      \
36         xmalloc.o       \
37         xsprintf.o
38
39
40 # ------------------------------------------------------------------------------
41 # Dummy targets
42
43 .PHONY: all
44 ifeq (.depend,$(wildcard .depend))
45 all:    lib
46 include .depend
47 else
48 all:    depend
49         @$(MAKE) -f make/gcc.mak all
50 endif
51
52 .PHONY: lib
53 lib:    $(LIB)
54
55 $(LIB): $(OBJS)
56         $(AR) rs $(LIB) $?
57
58 clean:
59         $(RM) *~ core *.map
60
61 zap:    clean
62         $(RM) *.o $(LIB) .depend
63
64 # ------------------------------------------------------------------------------
65 # Make the dependencies
66
67 .PHONY: depend dep
68 depend dep:     $(OBJS:.o=.c)
69         @echo "Creating dependency information"
70         $(CC) -MM $^ > .depend
71
72