2018-10-27 14:54:33 +00:00
|
|
|
CC=gcc
|
2018-10-27 15:19:52 +00:00
|
|
|
CFLAG= -c -g -O -I ../interpreter -o
|
2018-10-27 14:54:33 +00:00
|
|
|
objects=../interpreter/stack.o \
|
|
|
|
../interpreter/interpreter/core_methods.o \
|
|
|
|
../interpreter/interpreter/interpreter.o \
|
|
|
|
../interpreter/method_dispatcher/method_dispatcher.o \
|
|
|
|
main.o
|
|
|
|
|
|
|
|
|
|
|
|
all: clean lib $(objects) test
|
|
|
|
clean:
|
|
|
|
- rm code.bin
|
|
|
|
- rm main
|
|
|
|
lib:
|
|
|
|
cd ../interpreter && make -s
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAG) $@ $<
|
|
|
|
|
|
|
|
main: main.o
|
|
|
|
$(CC) -O -g $(objects) -o main
|
|
|
|
|
|
|
|
test: main code.bin
|
|
|
|
cd ../assembler && make test
|
|
|
|
valgrind ./main
|
|
|
|
|
|
|
|
code.bin:
|
|
|
|
python3 test.py
|
|
|
|
|