Refactor build system to use waf. Waf is better at handling dependency paths which I need for IDL support
This commit is contained in:
parent
df7f98bc6f
commit
9fd10dec9c
77 changed files with 312 additions and 86 deletions
48
Makefile
48
Makefile
|
@ -1,52 +1,14 @@
|
|||
CC := gcc
|
||||
|
||||
# Enable for debug
|
||||
CFLAGS := -g -ggdb -std=c99 -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wstrict-prototypes
|
||||
|
||||
INCLUDES := -I/usr/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/samba-4.0
|
||||
|
||||
siahsd_LIB := -ltalloc -ldbi -lglib-2.0
|
||||
siahsd_OBJ := sia.o status.o database.o config.o siahsd.o
|
||||
|
||||
secipd_LIB := -ltalloc -ldbi -lglib-2.0 -lndr
|
||||
secipd_OBJ := sia.o status.o database.o config.o ndr_secip.o secipd.o
|
||||
|
||||
|
||||
OBJ := $(siahsd_OBJ) $(secipd_OBJ)
|
||||
|
||||
binaries := siahsd secipd
|
||||
|
||||
all: $(binaries)
|
||||
all:
|
||||
bin/waf build
|
||||
|
||||
clean:
|
||||
rm -f $(binaries)
|
||||
rm -f $(OBJ)
|
||||
rm -f $(OBJ:.o=.d)
|
||||
rm -f ndr_*.[ch]
|
||||
rm -f secip.h
|
||||
bin/waf clean
|
||||
|
||||
distclean: clean
|
||||
rm -f tags
|
||||
|
||||
|
||||
secipd: $(secipd_OBJ)
|
||||
@echo Linking $@
|
||||
@$(CC) $(secipd_OBJ) $(secipd_LIB) -o secipd
|
||||
|
||||
siahsd: $(siahsd_OBJ)
|
||||
@echo Linking $@
|
||||
@$(CC) $(siahsd_OBJ) $(siahsd_LIB) -o siahsd
|
||||
distclean:
|
||||
bin/waf distclean
|
||||
|
||||
ctags:
|
||||
ctags `find -name \*.[ch]`
|
||||
|
||||
idl:
|
||||
pidl/pidl --ndr-parser=ndr_secip.c secip.idl
|
||||
pidl/pidl --header=secip.h secip.idl
|
||||
|
||||
%.o: %.c
|
||||
@echo Compiling $*.c
|
||||
@$(CC) -c $(CFLAGS) $(INCLUDES) -o $*.o $<
|
||||
@$(CC) -MM $(CFLAGS) -MT $*.o $(INCLUDES) -o $*.d $<
|
||||
|
||||
-include $(OBJ:.o=.d)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue