wmtemp (0.0.6-3) Makefile

Summary

 Makefile |   28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

    
download this patch

Patch contents

--- wmtemp-0.0.6.orig/Makefile
+++ wmtemp-0.0.6/Makefile
@@ -1,13 +1,15 @@
-CC=gcc
-LD=gcc
+#CC=gcc
+#LD=gcc
 SED=sed
 STRIP=strip
 
-DEST?=/usr/local/bin
-MAN?=/usr/local/share/man/man1
-
-CFLAGS=-Wall -Werror -O2 -I/usr/include/sensors -I/usr/local/include/sensors
-LDFLAGS=
+PREFIX?=/usr/local
+DEST=$(PREFIX)/bin
+MAN=$(PREFIX)/share/man/man1
+
+CFLAGS?=-Wall -Werror -O2
+LDFLAGS?=
+INCLUDE=-I/usr/include/sensors -I/usr/local/include/sensors
 LIBS=-L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lXpm -lsensors
 
 XPM=xpm/celcius_on.o xpm/celcius_off.o xpm/fahrenheit_on.o \
@@ -24,21 +26,21 @@
 	$(SED) -e "s/^static //" <$< >>$@
 
 .c.o:
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $<
 
 $(TARGET): $(OBJS)
-	$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-	$(STRIP) $@
+	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
 clean:
 	rm -f *.o xpm/*.o xpm/*.c core $(TARGET)
 
 install:
 	cp $(TARGET) $(DEST)/$(TARGET)
+#	$(STRIP) $(DEST)/$(TARGET)
 	chmod 755 $(DEST)/$(TARGET)
-	cp $(MANPAGE) $(MAN)/$(MANPAGE)
-	gzip -9 $(MAN)/$(MANPAGE)
-	chmod 644 $(MAN)/$(MANPAGE)
+#	cp $(MANPAGE) $(MAN)/$(MANPAGE)
+#	gzip -9 $(MAN)/$(MANPAGE)
+#	chmod 644 $(MAN)/$(MANPAGE)
 	
 main.o: dockapp.h temp.h xpm/xpm.h
 dockapp.o: dockapp.h