3a0fb8
diff -up pnm2ppa-1.04/Makefile.ldflags pnm2ppa-1.04/Makefile
3a0fb8
--- pnm2ppa-1.04/Makefile.ldflags	2018-03-01 15:38:09.225582684 +0100
3a0fb8
+++ pnm2ppa-1.04/Makefile	2018-03-01 15:50:34.307261745 +0100
3a0fb8
@@ -11,7 +11,6 @@ INSTALL=install
3a0fb8
 
3a0fb8
 # production build
3a0fb8
 CFLAGS=$(RPM_OPT_FLAGS) -DNDEBUG 
3a0fb8
-LDFLAGS=-lm
3a0fb8
 OBJS = pnm2ppa.o syslog.o ppa.o image.o dither.o cutswath.o hash_ink.o gamma.o
3a0fb8
 SRC =  pnm2ppa.c syslog.c ppa.c image.c dither.c cutswath.c hash_ink.c gamma.c
3a0fb8
 
3a0fb8
@@ -108,10 +107,10 @@ uninstall:
3a0fb8
 	rm -f $(CONFDIR)/pnm2ppa.conf
3a0fb8
 
3a0fb8
 pnm2ppa: $(OBJS) 
3a0fb8
-	$(CC) $(LDFLAGS) $(CFLAGS) -o pnm2ppa $(OBJS)
3a0fb8
+	$(CC) -lm $(LDFLAGS) $(CFLAGS) -o pnm2ppa $(OBJS)
3a0fb8
 
3a0fb8
 calibrate_ppa: calibrate_ppa.o pnmtools.o gamma.o
3a0fb8
-	$(CC) $(LDFLAGS) $(CFLAGS) -o calibrate_ppa calibrate_ppa.o pnmtools.o gamma.o 
3a0fb8
+	$(CC) -lm $(LDFLAGS) $(CFLAGS) -o calibrate_ppa calibrate_ppa.o pnmtools.o gamma.o 
3a0fb8
 
3a0fb8
 calibrate_ppa.o: calibrate_ppa.c global.h image.h defaults.h pnmtools.h
3a0fb8
 	$(CC) $(CFLAGS) -c calibrate_ppa.c
3a0fb8
@@ -144,7 +143,7 @@ syslog.o: syslog.c syslog.h global.h
3a0fb8
 	$(CC) $(CFLAGS) -c syslog.c
3a0fb8
 
3a0fb8
 make_hash_ink: 	make_hash_ink.c palette.h hash_ink.h
3a0fb8
-	$(CC) $(CFLAGS) -o make_hash_ink make_hash_ink.c
3a0fb8
+	$(CC) $(CFLAGS) -lm $(LDFLAGS) -o make_hash_ink make_hash_ink.c
3a0fb8
 
3a0fb8
 hash_ink.c: make_hash_ink
3a0fb8
 	./make_hash_ink 4 3 > hash_ink.c
3a0fb8
diff -up pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile.ldflags pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile
3a0fb8
--- pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile.ldflags	2018-03-01 15:38:09.226582676 +0100
3a0fb8
+++ pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile	2018-03-01 15:53:22.016739424 +0100
3a0fb8
@@ -1,6 +1,5 @@
3a0fb8
 CC=gcc
3a0fb8
 CFLAGS=$(RPM_OPT_FLAGS)
3a0fb8
-LDFLAGS=
3a0fb8
 PRINTER=HP720
3a0fb8
 
3a0fb8
 default: all
3a0fb8
@@ -23,7 +22,7 @@ pbm2ppa: pbm2ppa.o ppa.o pbm.o cutswath.
3a0fb8
 	$(CC) $(LDFLAGS) -o pbm2ppa pbm2ppa.o ppa.o pbm.o cutswath.o
3a0fb8
 
3a0fb8
 pbmtpg: pbmtpg.o
3a0fb8
-	$(CC) $(CFLAGS) -o pbmtpg pbmtpg.o -lm
3a0fb8
+	$(CC) $(CFLAGS) $(LDFLAGS) -o pbmtpg pbmtpg.o -lm
3a0fb8
 
3a0fb8
 .c.o: $*.c ppa.h pbm.h
3a0fb8
 	$(CC) $(CFLAGS) -DDEFAULT_PRINTER=$(PRINTER)  -c $*.c