INSTALLDIR = /usr/X11R6/libexec/gkrellm2/plugins VERSION = 2.3.1 PKGNAME = gkrellm-helium CFLAGS?= -Wall -O2 #CFLAGS?= -Wall -ggdb all: helium.so test helium.o: helium.c gcc $(CFLAGS) -fPIC -Wall `pkg-config gtk+-2.0 --cflags` -DVERSION=\"$(VERSION)\" -c helium.c helium.so: helium.o udp_net.o http_net.o gcc $(CFLAGS) -shared -Wl -lcurl -L/usr/local/lib `pkg-config gtk+-2.0 --libs` -o helium.so helium.o udp_net.o http_net.o udp_net.o: udp_net.c gcc $(CFLAGS) -c udp_net.c http_net.o: http_net.c gcc $(CFLAGS) -c http_net.c test.o: test.c gcc $(CFLAGS) -c test.c test: http_net.o udp_net.o test.o gcc $(CFLAGS) -o test -lcurl -L/usr/local/lib test.o http_net.o udp_net.o clean: rm -f *.o *.so core install: helium.so install -d $(INSTALLDIR) install -c -s -m 644 helium.so $(INSTALLDIR) dist: rm -rf $(PKGNAME)-$(VERSION) mkdir $(PKGNAME)-$(VERSION) cp Makefile helium.c udp_net.c http_net.c misc.h test.c $(PKGNAME)-$(VERSION)/ tar zcf $(PKGNAME)-$(VERSION).tgz $(PKGNAME)-$(VERSION) rm -rf $(PKGNAME)-$(VERSION)