Initial commit
This commit is contained in:
22
Makefile
Normal file
22
Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
CC=gcc
|
||||
CFLAGS=-g -std=c11
|
||||
LD=gcc
|
||||
LDFLAGS=-g
|
||||
|
||||
SRCS=$(wildcard src/*.c)
|
||||
OBJS=$(SRCS:src/%.c=bin/%.o)
|
||||
DEPS=$(SRCS:src/%.c=bin/deps/%.d)
|
||||
|
||||
glisp: $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
bin/%.o: src/%.c
|
||||
@mkdir -p bin/deps
|
||||
$(CC) $(CFLAGS) -c -MMD -MF $(^:src/%.c=bin/deps/%.d) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -rf glisp bin/
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
-include $(DEPS)
|
||||
Reference in New Issue
Block a user