]> git.sur5r.net Git - cc65/blob - src/cl65/make/gcc.mak
Fixed a bug
[cc65] / src / cl65 / make / gcc.mak
1 #
2 # Makefile for the cl65 compile&link utility
3 #
4
5 # Library dir
6 COMMON  = ../common
7
8 # Type of spawn function to use
9 SPAWN   = SPAWN_UNIX
10
11
12 CC=gcc
13 CFLAGS = -O2 -g -Wall -W -I$(COMMON) -D$(SPAWN)
14 EBIND  = emxbind
15 LDFLAGS=
16
17 OBJS =  error.o         \
18         global.o        \
19         main.o
20
21 LIBS = $(COMMON)/common.a
22
23 EXECS = cl65
24
25
26 .PHONY: all
27 ifeq (.depend,$(wildcard .depend))
28 all : $(EXECS)
29 include .depend
30 else
31 all:    depend
32         @$(MAKE) -f make/gcc.mak all
33 endif
34
35
36 cl65:   $(OBJS) $(LIBS)
37         $(CC) $(LDFLAGS) -o cl65 $(OBJS) $(LIBS)
38         @if [ $(OS2_SHELL) ] ;  then $(EBIND) cl65 ; fi
39
40 clean:
41         $(RM) *~ core
42
43 zap:    clean
44         $(RM) *.o $(EXECS) .depend
45
46
47 # ------------------------------------------------------------------------------
48 # Make the dependencies
49
50 .PHONY: depend dep
51 depend dep:     $(OBJS:.o=.c)
52         @echo "Creating dependency information"
53         $(CC) -I$(COMMON) -D$(SPAWN) -MM $^ > .depend
54
55
56