Remove hardcoded compiler and optimiation flags. Index: src/makefile --- src/makefile.orig +++ src/makefile @@ -90,29 +90,16 @@ NE_NOWCHAR= NE_DEBUG= NE_TEST= -ifeq ($(origin CC),default) -CC=c99 -endif +GCCFLAGS=-std=c99 -Wall -Wno-parentheses -fno-strict-aliasing -Wp,-D_FORTIFY_SOURCE=2 -# Test for GCC -ifneq (,$(findstring gcc,$(shell $(CC) 2>&1))) -GCCFLAGS=-std=c99 -Wall -Wno-parentheses -fno-strict-aliasing -flto=auto -ffat-lto-objects -Wp,-D_FORTIFY_SOURCE=2 -LDFLAGS=-flto=auto -endif - CFLAGS=$(GCCFLAGS) \ -D_REGEX_LARGE_OFFSETS -D_GNU_SOURCE -DSTDC_HEADERS -DHAVE_SNPRINTF \ - $(if $(NE_NOWCHAR), -DNOWCHAR,) \ - $(if $(NE_TEST), -DNE_TEST -coverage,) \ - $(if $(NE_DEBUG), -g -O -fsanitize=address -fsanitize=undefined,-O3 -DNDEBUG) \ - $(if $(NE_TERMCAP), -DNE_TERMCAP,) \ - $(if $(NE_ANSI), -DNE_TERMCAP -DNE_ANSI,) \ $(OPTS) LIBS=$(if $(NE_TERMCAP)$(NE_ANSI),,-lcurses) -ne: $(OBJS) $(if $(NE_TERMCAP)$(NE_ANSI),$(TERMCAPOBJS),) - $(CC) $(LDFLAGS) $(if $(NE_TEST), -coverage,) $(if $(NE_DEBUG), -fsanitize=address -fsanitize=undefined,) $^ $(LIBS) $(OPTS) -lm -o $(PROGRAM) +ne: $(OBJS) + $(CC) $(LDFLAGS) $(OBJS) $(LIBS) $(OPTS) -lm -lcurses -o $(PROGRAM) clean: rm -f ne *.o *.gcda *.gcda.info *.gcno core