Update Makefile
This commit is contained in:
14
Makefile
14
Makefile
@@ -9,15 +9,19 @@ CFLAGS += -save-temps
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef debug
|
ifdef debug
|
||||||
CFLAGS += -O0 -fno-omit-frame-pointer -g
|
CFLAGS += -O0 -fno-omit-frame-pointer
|
||||||
|
FLAGS += -g
|
||||||
else
|
else
|
||||||
CFLAGS += -O3 -fomit-frame-pointer -DNDEBUG
|
CFLAGS += -O3 -fomit-frame-pointer -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef sanitize
|
ifdef sanitize
|
||||||
CFLAGS += -fsanitize=$(sanitize)
|
FLAGS += -fsanitize=$(sanitize)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += $(FLAGS)
|
||||||
|
LDFLAGS += $(FLAGS)
|
||||||
|
|
||||||
.PHONY: default install clean setcap
|
.PHONY: default install clean setcap
|
||||||
|
|
||||||
default: glorytun
|
default: glorytun
|
||||||
@@ -32,8 +36,4 @@ clean:
|
|||||||
setcap:
|
setcap:
|
||||||
setcap cap_net_admin+ep glorytun
|
setcap cap_net_admin+ep glorytun
|
||||||
|
|
||||||
glorytun: glorytun.o
|
glorytun.o: common.h common-static.h
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $^ -o $@
|
|
||||||
|
|
||||||
glorytun.o: glorytun.c common.h common-static.h
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
|
||||||
|
|||||||
Reference in New Issue
Block a user