25 lines
371 B
Makefile
25 lines
371 B
Makefile
CC = cc
|
|
RM = rm -f
|
|
TARGETS = bin/blang
|
|
|
|
all: $(TARGETS)
|
|
|
|
clean:
|
|
$(RM) $(TARGETS)
|
|
|
|
bin:
|
|
mkdir -p bin
|
|
build:
|
|
mkdir -p build
|
|
|
|
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
|
|
|
|
.PHONY: all clean
|