1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-24 09:17:17 +00:00
janet/Makefile
Calvin Rose 0557c8b2a6 Consolidate files
* Move GC struct into VM for easier use.
* Put all data structures into one file
2017-02-09 18:52:19 -05:00

38 lines
599 B
Makefile

# TIL
CFLAGS=-std=c99 -Wall -Wextra -g
TARGET=interp
PREFIX=/usr/local
# C sources
HEADERS=vm.h ds.h compile.h parse.h value.h
SOURCES=main.c parse.c value.c vm.c ds.c compile.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)
.PHONY: clean install run debug valgrind