2022-12-08 21:51:40 -07:00
|
|
|
CC = cc
|
|
|
|
RM = rm -f
|
|
|
|
TARGETS = bin/blang
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(TARGETS)
|
|
|
|
|
|
|
|
bin:
|
|
|
|
mkdir -p bin
|
2022-12-09 17:26:10 -07:00
|
|
|
build:
|
|
|
|
mkdir -p build
|
2022-12-08 21:51:40 -07:00
|
|
|
|
2022-12-09 17:26:10 -07:00
|
|
|
build/blang.o: build src/blang.c src/blang.h
|
|
|
|
$(CC) -c -o $@ src/blang.c
|
|
|
|
|
|
|
|
build/ops.o: build src/blang.h src/ops.c src/ops.h
|
|
|
|
$(CC) -c -o $@ src/ops.c
|
|
|
|
|
|
|
|
bin/blang: bin build/blang.o build/ops.o
|
|
|
|
$(CC) $(CFLAGS) -o $@ build/*.o
|
2022-12-08 21:51:40 -07:00
|
|
|
|
|
|
|
.PHONY: all clean
|