aboutsummaryrefslogtreecommitdiffstats
path: root/service/src/Makefile
blob: 2fee8c4b4316f51dec92adbf00800f3f84d187e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CFLAGS = -g -I .

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)