old-SuperVM/libvm/Makefile

36 lines
490 B
Makefile
Raw Permalink Normal View History

2016-06-29 08:55:22 +00:00
CC = gcc
2016-07-01 09:18:31 +00:00
CFLAGS=-O3
2016-06-29 08:55:22 +00:00
2016-07-02 15:21:06 +00:00
all: svmln expdump emulator svmas
2016-06-29 08:55:22 +00:00
.PHONY: as clean run
2016-07-02 15:21:06 +00:00
svmln: svmln.c
2016-07-01 09:18:31 +00:00
$(CC) -g -o bin/$@ $^ $(CFLAGS)
2016-06-29 14:39:25 +00:00
expdump: expdump.c mnemonics.c disassembler.c
2016-07-01 09:18:31 +00:00
$(CC) -g -o bin/$@ $^ $(CFLAGS)
2016-06-29 08:55:22 +00:00
emulator: emulator.c vm.c
2016-07-01 09:18:31 +00:00
$(CC) -g -o bin/$@ $^ -lSDL $(CFLAGS)
2016-07-02 15:21:06 +00:00
svmas:
2016-07-01 17:58:34 +00:00
$(MAKE) -C as
2016-07-02 15:21:06 +00:00
2016-06-29 08:55:22 +00:00
test: exp
./exp -o test.exp $(ARGS)
hexdump -C test.exp
run: test.exp
2016-07-01 09:18:31 +00:00
./bin/emulator -dV $^
%.exp: %.bin
./bin/explink -o $@ -c $^
%.bin: %.asm
./bin/as -o $@ -L $^
clean:
2016-07-01 17:58:34 +00:00
rm *.bin