-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.in
49 lines (37 loc) · 1.25 KB
/
Makefile.in
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
export CC := gcc
export INCS +=
export LIBS +=
export CFLAGS += -O2 -ggdb -Wall -Wextra -pipe
export CFLAGS += -Wcast-align -Wformat=2 -Wformat-security -fno-common
export CFLAGS += -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
export CFLAGS += -Wstrict-overflow -Wtrampolines -flto
export CFLAGS += -fstack-protector-all
export CFLAGS += -D _FORTIFY_SOURCES=2
export CFLAGS += -fstack-reuse=all -fbounds-check
export CFLAGS += -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-O1
export CFLAGSSO = $(CFLAGS) -ldl -lc -shared -rdynamic
.PHONY: all
all: force_bind.so
force_bind.so: force_bind.c force_bind_config.h
$(CC) $(CFLAGSSO) -fPIC -Wl,-soname,force_bind.so -o $@ force_bind.c
test_bind: test_bind.c
$(CC) $(CFLAGS) $< -o $@
test_bind6: test_bind6.c
$(CC) $(CFLAGS) $< -o $@
send_udp: send_udp.c
$(CC) $(CFLAGS) $< -o $@
test_client: test_client.c
$(CC) $(CFLAGS) $< -o $@
test_client6: test_client6.c
$(CC) $(CFLAGS) $< -o $@
test_poll: test_poll.c
$(CC) $(CFLAGS) $< -o $@
.PHONY: clean
clean:
@rm -f force_bind.so.* test_bind send_udp test_client test_client6 \
*.a *.o *.so* $(PRJ)-*.rpm $(PRJ)-*-*-*.tgz $(PRJ)-*.tar.gz \
*.strace *.log *.out \
test_poll
install: all
@mkdir -p $(I_USR_LIB)
cp -vd force_bind.so $(I_USR_LIB)