From: Sascha Steinbiss Date: Sat, 8 May 2021 10:58:01 +0000 (+0000) Subject: add hardening flags X-Git-Tag: archive/raspbian/0.1+git20221215.85f159e-1+rpi1~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d16d2a3535141f34afcf86ffd18ccf992543cb07;p=fermi-lite.git add hardening flags Last-Update: 2016-01-08 Adds necessary build flags for hardening. Gbp-Pq: Name hardening --- diff --git a/Makefile b/Makefile index 1e11a07..2e3b002 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,27 @@ -CC= gcc -CFLAGS= -g -Wall -O2 -fPIC #-fno-inline-functions -fno-inline-functions-called-once -CPPFLAGS= +CC?= gcc +CFLAGS+= -g -Wall -O2 -fPIC #-fno-inline-functions -fno-inline-functions-called-once +#CPPFLAGS= INCLUDES= OBJS= kthread.o misc.o \ bseq.o htab.o bfc.o \ rle.o rope.o mrope.o rld0.o \ unitig.o mag.o bubble.o ksw.o PROG= fml-asm -LIBS= -lm -lz -lpthread +LDLIBS+= -lm -lz -lpthread SONUMBER=0 .SUFFIXES:.c .o -.c.o: - $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $< -o $@ - all:$(PROG) libfml.so.$(SONUMBER) fml-asm:libfml.a example.o - $(CC) $(CFLAGS) $^ -o $@ -L. -lfml $(LIBS) + $(CC) $(LDFLAGS) $(CFLAGS) $^ -o $@ -L. -lfml $(LDLIBS) libfml.a:$(OBJS) $(AR) -csru $@ $(OBJS) libfml.so.$(SONUMBER): $(OBJS) - $(CC) -shared -o $@ $(OBJS) -fPIC -Wl,-soname,libfml.so.$(SONUMBER) $(LIBS) $(LDFLAGS) + $(CC) $(LDFLAGS) -shared -o $@ $(OBJS) -fPIC -Wl,-soname,libfml.so.$(SONUMBER) $(LDLIBS) clean: