diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-05-19 20:39:47 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-05-19 20:39:47 +0200 |
| commit | bcb8884e6fb74b6d3e3c234caa8ffec7be005ecf (patch) | |
| tree | e8f9680ae2809ba46c627e493c4c76d916c0943f /service/src/Makefile | |
| parent | 16b3dff93e5d1096174749e1b809728f585d95fb (diff) | |
| download | enowars5-service-stldoctor-bcb8884e6fb74b6d3e3c234caa8ffec7be005ecf.tar.gz enowars5-service-stldoctor-bcb8884e6fb74b6d3e3c234caa8ffec7be005ecf.zip | |
added permium users, second vuln and minor fixes all around
Diffstat (limited to 'service/src/Makefile')
| -rw-r--r-- | service/src/Makefile | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/service/src/Makefile b/service/src/Makefile index c46988a..d7732b3 100644 --- a/service/src/Makefile +++ b/service/src/Makefile @@ -1,14 +1,21 @@ CFLAGS = -g -I . +# fortify source code +CFLAGS += -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 +LDFLAGS = -Wl,-z,now -Wl,-z,relro + .PHONY: all clean -all: stldoctor +all: build/stldoctor clean: - rm -f stldoctor *.o + rm -rf build + +build: + mkdir build -%.o: %.c %.h +build/%.o: %.c %.h | build $(CC) -c -o $@ $< $(CFLAGS) $(LDLIBS) -stldoctor: main.c stlfile.o util.o +build/stldoctor: build/$(PREFIX)stlfile.o build/$(PREFIX)util.o $(PREFIX)main.c | build $(CC) -o $@ $^ $(CFLAGS) $(LDLIBS) |
