Moved some code around.
[picobit/chj.git] / makefile
blobe9f22cc0fabe2d3990b24542fd24e602c61f9df6
1 # TODO make libpcap an option
3 all: picobit-vm
5 picobit-vm: picobit-vm.o gc.o bignums.o debug.o primitives.o dispatch.o
6 cc -o picobit-vm picobit-vm.o gc.o bignums.o debug.o primitives.o dispatch.o -lpcap
8 .c.o:
9 $(CC) -O -c $*.c
11 # TODO instead, maybe have these targets change a variable (CFLAGS ?) and call the all target ?
12 debug:
13 cc -O -c -g -DDEBUG picobit-vm.c
14 cc -O -c -g -DDEBUG gc.c
15 cc -O -c -g -DDEBUG bignums.c
16 cc -O -c -g -DDEBUG debug.c
17 cc -O -c -g -DDEBUG primitives.c
18 cc -O -c -g -DDEBUG dispatch.c
19 make picobit-vm
21 debug-gc:
22 cc -O -c -g -DDEBUG -DDEBUG_GC picobit-vm.c
23 cc -O -c -g -DDEBUG -DDEBUG_GC gc.c
24 cc -O -c -g -DDEBUG -DDEBUG_GC bignums.c
25 cc -O -c -g -DDEBUG -DDEBUG_GC debug.c
26 cc -O -c -g -DDEBUG -DDEBUG_GC primitives.c
27 cc -O -c -g -DDEBUG -DDEBUG_GC dispatch.c
28 make picobit-vm
30 mcc: picoboard2.c picobit-vm.c gc.c bignums.c debug.c primitives.c dispatch.c
31 cpp -DPICOBOARD2 picobit-vm.c | /bin/grep -v '^#' > picobit-vm.mcc.c
32 wine ~/.wine/drive_c/MCC18/bin/mcc18.exe -I=C:/MCC18/h -p=18f4550 picoboard2.c
33 wine ~/.wine/drive_c/MCC18/bin/mplink.exe -lC:/MCC18/lib -mpicoboard2.map picoboard2.lkr picoboard2.o -o picoboard2.hex
35 clean:
36 rm -f *.o *~ picobit-vm