aboutsummaryrefslogtreecommitdiffstats
path: root/service/src/Makefile
blob: d7732b3655efa69592a5180bd56efbe3ab525d26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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: build/stldoctor

clean:
	rm -rf build

build:
	mkdir build

build/%.o: %.c %.h | build
	$(CC) -c -o $@ $< $(CFLAGS) $(LDLIBS)

build/stldoctor: build/$(PREFIX)stlfile.o build/$(PREFIX)util.o $(PREFIX)main.c | build
	$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)