Swap waf for a Makefile
This commit is contained in:
parent
6e26a3eed5
commit
f01f2777f7
19 changed files with 32 additions and 95 deletions
49
Makefile
49
Makefile
|
@ -1,19 +1,34 @@
|
|||
all:
|
||||
@waf build
|
||||
LIBS := \
|
||||
dbi \
|
||||
glib-2.0 \
|
||||
gmp \
|
||||
hogweed \
|
||||
nettle \
|
||||
talloc \
|
||||
tevent
|
||||
|
||||
CC := gcc
|
||||
CFLAGS := -O -g -ggdb -std=gnu99 -Wall -Wextra -Winit-self -Wformat-security -Wshadow -pedantic -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -Werror-implicit-function-declaration -Wstrict-prototypes -fPIC -pie -fstack-protector -D_FORTIFY_SOURCE=2
|
||||
LDFLAGS := -fPIC -pie -z relro -z now -fstack-protector
|
||||
|
||||
SRCDIR=src
|
||||
BUILD=build
|
||||
|
||||
CFLAGS += $(shell pkg-config --cflags $(LIBS))
|
||||
LDFLAGS += $(shell pkg-config --libs $(LIBS))
|
||||
|
||||
$(BUILD)/%.o: $(SRCDIR)/%.c
|
||||
@echo [CC] $@
|
||||
@mkdir -p `dirname $@`
|
||||
@$(CC) -o $@ -c $< $(CFLAGS)
|
||||
|
||||
$(BUILD)/siahsd: $(patsubst %, $(BUILD)/%.o, siahsd database config status sia siahs jsonbot hook_script)
|
||||
@echo [LD] $@
|
||||
@$(CC) $(LDFLAGS) -o $@ $^
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(BUILD)/siahsd
|
||||
|
||||
clean:
|
||||
@waf clean
|
||||
|
||||
distclean:
|
||||
@waf distclean
|
||||
@rm tags
|
||||
|
||||
ctags:
|
||||
@ctags `find -name \*.[ch]`
|
||||
|
||||
coverity:
|
||||
@if [ -d cov-int ]; then rm -rf cov-int;fi
|
||||
@mkdir cov-int
|
||||
@cov-build --dir=cov-int waf configure clean build
|
||||
@tar cvzf coverity_siahsd.tgz cov-int
|
||||
@rm -rf cov-int
|
||||
@rm -rf $(BUILD)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue