-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
65 lines (41 loc) · 1.03 KB
/
GNUmakefile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
S := $(CURDIR)
SRC = $(S)/src
MK_INCLUDE = $(S)/mk
O := $(S)/obj
O_OBJ = $(O)/src
PHONY =
PHONY += all
all: pf-apply
USE_OPENBSD ?= 0
include $(MK_INCLUDE)/install_vars.mk
include $(MK_INCLUDE)/prj.mk
include $(MK_INCLUDE)/compile_c_opts.mk
include $(MK_INCLUDE)/warnflags_base.mk
ifneq ($(NO_WERROR),1)
include $(MK_INCLUDE)/warnflags_werror.mk
endif
ifeq ($(STATIC),1)
include $(MK_INCLUDE)/static.mk
endif
ifeq ($(HARDEN),1)
include $(MK_INCLUDE)/c_harden.mk
endif
include $(MK_INCLUDE)/compile_c.mk
include $(MK_INCLUDE)/obj_defs.mk
include $(MK_INCLUDE)/common_targets.mk
include $(MK_INCLUDE)/FIXME_GNU_only.mk
FLATTENED_TARGETS := pf-apply
PHONY += $(FLATTENED_TARGETS)
$(FLATTENED_TARGETS): %: $(O)/%
$(O):
$(MKDIRP) -- $@
$(O_OBJ):
$(MKDIRP) -- $@
$(O_OBJ)/%.o: $(SRC)/%.c $(wildcard $(SRC)/%.h) | $(O_OBJ)
$(MKDIRP) -- $(@D)
$(COMPILE_C) $< -o $@
$(O)/pf-apply: \
$(foreach f,$(OBUNDLE_APP_PF_APPLY),$(O_OBJ)/$(f).o $(wildcard $(SRC)/$(f).h)) | $(O)
$(LINK_O) $(filter-out %.h,$^) -o $@
FORCE:
.PHONY: $(PHONY)