-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 992 Bytes
/
Makefile
File metadata and controls
38 lines (29 loc) · 992 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
# Build flags come from gnustep-config so they work on any GNUstep platform
# (OpenBSD with pkg_add gnustep-make gnustep-base libobjc2, or Linux).
CC = cc
CFLAGS = $(shell gnustep-config --objc-flags) -fobjc-arc
LDFLAGS = $(shell gnustep-config --base-libs)
TARGET = pf-blocker
SRCS = main.m \
HBPConfiguration.m \
HBPAuthLogScanner.m \
HBPBlockManager.m \
HBPViolationScanner.m
TEST_TARGET = tests/test_pf_blocker
TEST_SRCS = tests/test_pf_blocker.m \
HBPConfiguration.m \
HBPAuthLogScanner.m \
HBPViolationScanner.m \
HBPBlockManager.m
all: $(TARGET)
$(TARGET): $(SRCS)
$(CC) $(CFLAGS) -o $(TARGET) $(SRCS) $(LDFLAGS)
test: $(TEST_TARGET)
./$(TEST_TARGET)
$(TEST_TARGET): $(TEST_SRCS)
$(CC) $(CFLAGS) -o $(TEST_TARGET) $(TEST_SRCS) $(LDFLAGS)
clean:
rm -f $(TARGET) $(TEST_TARGET)
install:
install -m 0755 $(TARGET) /usr/local/sbin/pf-blocker
.PHONY: all test clean install