climp

Dirty interpreter for the limp programming language in C

git clone https://git.8pit.net/climp.git

 1# See LICENSE for license details.
 2BIN_NAME = climp
 3
 4OBJECTS = $(BIN_NAME).o scanner.o parser.o env.o eval.o util.o
 5HEADERS = scanner.h parser.h env.h util.h
 6
 7CFLAGS ?= -O0 -g -pedantic -Wall -Werror
 8CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200809L -I./compat
 9
10CC      ?= cc
11LDFLAGS += -pthread
12
13%.o: %.c $(HEADERS)
14	$(CC) -c -o $@ $< $(CFLAGS)
15
16all: $(BIN_NAME)
17$(BIN_NAME): $(OBJECTS)
18	$(CC) -o $@ $^ $(LDFLAGS)
19
20clean:
21	$(RM) $(BIN_NAME) $(OBJECTS)