]> git.sur5r.net Git - cc65/blob - src/sim65/make/gcc.mak
First test plugin
[cc65] / src / sim65 / make / gcc.mak
1 #
2 # gcc Makefile for sim65
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 =  chip.o          \
14         chippath.o      \
15         cpucore.o       \
16         cputype.o       \
17         error.o         \
18         global.o        \
19         main.o          \
20         memory.o        \
21         simdata.o
22
23 LIBS = $(COMMON)/common.a
24
25 EXECS = sim65
26
27 .PHONY: all
28 ifeq (.depend,$(wildcard .depend))
29 all : $(EXECS)
30 include .depend
31 else
32 all:    depend
33         @$(MAKE) -f make/gcc.mak all
34 endif
35
36
37
38 sim65:  $(OBJS) $(LIBS)
39         $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) -ldl
40         @if [ $(OS2_SHELL) ] ;  then $(EBIND) $@ ; fi
41
42 clean:
43         rm -f *~ core *.lst
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) -I$(COMMON) -MM $^ > .depend
55
56