bulk changes: main feat: GNU target
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,6 +1,7 @@
|
||||
prefix = /usr/bin
|
||||
|
||||
YAIT_SRCS := $(wildcard src/*.c)
|
||||
YAIT_OBJS := $(patsubst src/%.c,build/obj/%.o,$(YAIT_SRCS))
|
||||
|
||||
YAIT := bin/yait
|
||||
|
||||
@@ -16,9 +17,13 @@ all: build $(YAIT)
|
||||
|
||||
build:
|
||||
mkdir -p bin
|
||||
mkdir -p build/obj
|
||||
|
||||
$(YAIT): $(YAIT_SRCS) config.mak
|
||||
$(CC) $(CFLAGS) -Iinclude -DCOMMIT=$(shell git rev-list --count --all) $(YAIT_SRCS) -o $@
|
||||
build/obj/%.o: src/%.c config.mak
|
||||
$(CC) $(CFLAGS) -Iinclude -c $< -o $@
|
||||
|
||||
$(YAIT): $(YAIT_OBJS)
|
||||
$(CC) $(CFLAGS) -Iinclude -DCOMMIT=$(shell git rev-list --count --all) $^ -o $@
|
||||
|
||||
endif
|
||||
|
||||
@@ -32,6 +37,7 @@ uninstall:
|
||||
|
||||
clean:
|
||||
$(RM) -rf bin
|
||||
$(RM) -rf build
|
||||
|
||||
dist-clean: clean
|
||||
$(RM) -f config.mak
|
||||
|
||||
Reference in New Issue
Block a user