diff --git a/Makefile b/Makefile index c395721..2c61dff 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,7 @@ HOSTCC=$(CC) # USTAT - ustat(), no statfs etc. # #CFLAGS=-Wall -O2 -pipe -DSECUREWARE -DUSE_POLL -CFLAGS=-Wall -O2 -pipe +CFLAGS=-Wall -O2 -pipe -fPIE #CFLAGS=-O -DSVR4 #CFLAGS=-O -DSVR4 -DSVR42 #CFLAGS=-O -DUSE_POLL @@ -150,7 +150,7 @@ CFLAGS=-Wall -O2 -pipe # "utmp.o: unresolved symbol _login" # For Linux, add "-lutil" if the linker complains about "updwtmp". # -LDFLAGS= +LDFLAGS=-z now -pie #LIBS= #LIBS=-lprot -lsocket # SCO Unix #LIBS=-lsocket @@ -568,7 +568,7 @@ sendfax.config: sendfax.cfg.in sedscript ./sedscript sendfax.config newslock: compat/newslock.c - $(CC) $(CFLAGS) -o newslock compat/newslock.c + $(CC) $(CFLAGS) $(LDFLAGS) -o newslock compat/newslock.c # internal: use this to create a "clean" mgetty+sendfax tree bindist: all doc-all sedscript diff --git a/fax/Makefile b/fax/Makefile index 89ceccb..7796e8d 100644 --- a/fax/Makefile +++ b/fax/Makefile @@ -5,7 +5,8 @@ # CC=gcc -CFLAGS=-O2 -I.. -Wall +CFLAGS=-O2 -I.. -Wall -fPIE +LDFLAGS=-z now -pie FAX_SCRIPTS=faxspool faxrunq faxq faxrm @@ -36,7 +37,7 @@ faxheader: faxheader.in ../sedscript @cd .. ; $(MAKE) sedscript faxq-helper: faxq-helper.o - $(CC) $(CFLAGS) -o faxq-helper faxq-helper.o + $(CC) $(CFLAGS) $(LDFLAGS) -o faxq-helper faxq-helper.o faxq-helper.o: faxq-helper.c ../sedscript $(CC) $(CFLAGS) -DFAX_SPOOL_OUT=\"$(FAX_SPOOL_OUT)\" \ diff --git a/frontends/X11/viewfax/Makefile b/frontends/X11/viewfax/Makefile index 9fa4fae..8b8b20f 100644 --- a/frontends/X11/viewfax/Makefile +++ b/frontends/X11/viewfax/Makefile @@ -37,20 +37,20 @@ OPT = -g -O2 -Wno-uninitialized -ansi -pedantic #LDFLAGS = $(OPT) #LIBS = -lsocket # vanilla BSD -CC = cc -CFLAGS = -DBSD $(OPT) -DHELPFILE=$(HELP) -I/usr/local/include -LDFLAGS = $(OPT) -LIBS = +#CC = cc +#CFLAGS = -DBSD $(OPT) -DHELPFILE=$(HELP) -I/usr/local/include +#LDFLAGS = $(OPT) +#LIBS = # sun solaris2 with gcc on supersparc: #CC = gcc #CFLAGS = -Wall $(OPT) -DHELPFILE=$(HELP) -msupersparc -I/usr/openwin/include #LDFLAGS = $(OPT) -L/usr/openwin/lib -R/usr/openwin/lib #LIBS = # linux -#CC = gcc -#CFLAGS = $(OPT) -DHELPFILE=$(HELP) -#LDFLAGS = $(OPT) -L/usr/X11R6/lib -#LIBS = +CC = gcc +CFLAGS = $(OPT) -DHELPFILE=$(HELP) -fPIE +LDFLAGS = $(OPT) -z now -pie -L/usr/X11R6/lib +LIBS = ####### End of configurable definitions ####### OBJS = viewfax.o faxinput.o faxinit.o faxexpand.o