forked from cyrus-and/zizzania
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.Makefile
More file actions
41 lines (32 loc) · 1020 Bytes
/
Copy pathconfig.Makefile
File metadata and controls
41 lines (32 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
all: config
.PHONY: all config
config: Makefile external/uthash.h
@echo "Build helpers are up to date."
Makefile: build_support/dry.Makefile
cp $< Makefile
SOURCES := $(wildcard src/*.c)
EXECUTABLES := src/airsnare.c
COMPILER_FLAGS := -Wall -Isrc -isystem external/
LINKER_FLAGS := -pthread
LIBRARIES := -lpcap
BUILD_PROFILES := release debug
SETUP_HOOK := external/uthash.h
CLEANUP_HOOK := -cleanup
INSTALL_DIR ?= /usr/local/bin
INSTALL_PATH := $(DESTDIR)$(INSTALL_DIR)
INSTALL_NAME ?= airsnare
DRY_DISABLE_DEFAULT_INSTALL := 1
release: COMPILER_FLAGS += -O3 -Os
debug: COMPILER_FLAGS += -ggdb3 -Werror -pedantic -DDEBUG -Wno-gnu-zero-variadic-macro-arguments
external/uthash.h: build_support/uthash.h
mkdir -p external
cp $< external/uthash.h
.PHONY: install uninstall
install: release
install -d $(INSTALL_PATH)
install -m 0755 src/airsnare $(INSTALL_PATH)/$(INSTALL_NAME)
uninstall:
$(RM) $(INSTALL_PATH)/$(INSTALL_NAME)
.PHONY: -cleanup
-cleanup:
$(RM) -r external/