1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 02:59:54 +00:00
janet/Makefile
Calvin Rose 439650f26a Add get and set instructions. GC is still buggy and currently
crashes everything all the time. :(
2017-02-12 21:54:18 -05:00

38 lines
658 B
Makefile

# TIL
CFLAGS=-std=c99 -Wall -Wextra -Wpedantic -g
TARGET=interp
PREFIX=/usr/local
# C sources
HEADERS=vm.h ds.h compile.h parse.h value.h disasm.h datatypes.h
SOURCES=main.c parse.c value.c vm.c ds.c compile.c disasm.c
OBJECTS=$(patsubst %.c,%.o,$(SOURCES))
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) -o $(TARGET) $(OBJECTS)
%.o : %.c $(HEADERS)
$(CC) $(CFLAGS) -o $@ -c $<
install: $(TARGET)
cp $(TARGET) $(PREFIX)/bin
clean:
rm $(TARGET) || true
rm $(OBJECTS) || true
run: $(TARGET)
./$(TARGET)
debug: $(TARGET)
gdb $(TARGET)
valgrind: $(TARGET)
valgrind ./$(TARGET) --leak-check=full
.PHONY: clean install run debug valgrind