]> git.sur5r.net Git - cc65/blob - src/sim65/chips/make/gcc.mak
First test plugin
[cc65] / src / sim65 / chips / make / gcc.mak
1 #
2 # gcc Makefile for the sim65 chip plugins
3 #
4
5 # Library dir
6 SIM65   = ..
7
8 CFLAGS  = -g -O2 -Wall -W -I$(SIM65) -fpic
9 CC      = gcc
10 EBIND   = emxbind
11 LDFLAGS =
12
13 CHIPS   =       ram.so
14
15 OBJS    = $(CHIPS:.so=.o)
16
17 .PHONY: all
18 ifeq (.depend,$(wildcard .depend))
19 all:    $(CHIPS)
20 include .depend
21 else
22 all:    depend
23         @$(MAKE) -f make/gcc.mak all
24 endif
25
26
27 ram.so:         ram.o
28         $(CC) $(CFLAGS) -shared -o $@ $^
29         @if [ $(OS2_SHELL) ] ;  then $(EBIND) $@ ; fi
30
31 clean:
32         rm -f *~ core *.lst
33
34 zap:    clean
35         rm -f *.o $(EXECS) .depend
36
37 # ------------------------------------------------------------------------------
38 # Make the dependencies
39
40 .PHONY: depend dep
41 depend dep:     $(CHIPS:.so=.c)
42         @echo "Creating dependency information"
43         $(CC) -I$(SIM65) -MM $^ > .depend
44
45