--- Makefile.orig	Tue Nov 26 19:24:39 2002
+++ Makefile	Fri Dec 13 02:59:14 2002
@@ -1,6 +1,6 @@
 PKGNAME = gkrellweather
 VERSION = 2.0.5
-CFLAGS = -O2 -Wall -fPIC `pkg-config gtk+-2.0 --cflags`
+CFLAGS += -Wall -fPIC `pkg-config gtk+-2.0 --cflags`
 LIBS = `pkg-config gtk+-2.0 --libs`
 LFLAGS = -shared
 
@@ -8,24 +8,20 @@
 
 OBJS = gkrellweather.o
 
+all: gkrellweather.so
+
 gkrellweather.so: $(OBJS)
-	$(CC) $(OBJS) -DVERSION=\"$(VERSION)\" -o gkrellweather.so $(LFLAGS) $(LIBS)  -lpthread
+	${CC} ${OBJS} ${PTHREAD_LIBS} -DVERSION=\"${VERSION}\" -o gkrellweather.so ${LFLAGS} ${LIBS}
 
 clean:
 	rm -f *.o core *.so* *.bak *~
 
 gkrellweather.o: gkrellweather.c
-	$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c gkrellweather.c
+	${CC} ${CFLAGS} ${PTHREAD_CFLAGS} -DVERSION=\"$(VERSION)\" -c gkrellweather.c
 
 install:
-	if [ -d /usr/lib/gkrellm2/plugins/ ] ; then \
-		install -c -s -m 644 gkrellweather.so /usr/lib/gkrellm2/plugins/ ; \
-	elif [ -d /usr/local/lib/gkrellm2/plugins/ ] ; then \
-		install -c -s -m 644 gkrellweather.so /usr/local/lib/gkrellm2/plugins/ ; \
-	else \
-		install -D -c -s -m 644 gkrellweather.so /usr/local/lib/gkrellm2/plugins/gkrellweather.so ; \
-	fi
-	install -c -m 755 GrabWeather /usr/local/bin
+	${MKDIR} ${PREFIX}/libexec/gkrellm2/plugins
+	${INSTALL_DATA} gkrellweather.so ${PREFIX}/libexec/gkrellm2/plugins
 
 uninstall:
 	rm -f /usr/lib/gkrellm2/plugins/gkrellweather.so
