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