X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Makefile;h=68ead5837758ba4dacbc211655c44f3023d5c7d5;hb=21c929acd4a42145fc353c2e2507816022039e2a;hp=2fd1dd28e6b3a6073c7b8720674bdf7994743eee;hpb=8e7b460758fb8a59697f2a95f1dc6279a676998f;p=dak.git diff --git a/Makefile b/Makefile index 2fd1dd28..68ead583 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,17 @@ -sql-aptvc.so: sql-aptvc.cpp - gcc -Wall -I/usr/include/postgresql/ sql-aptvc.cpp -fPIC -shared -lapt-pkg -o sql-aptvc.so +#!/usr/bin/make -f + +CXXFLAGS = -I/usr/include/postgresql/ -I/usr/include/postgresql/server/ -fPIC -Wall +CFLAGS = -fPIC -Wall +LDFLAGS = -fPIC +LIBS = -lapt-pkg + +C++ = g++ + +all: sql-aptvc.so + +sql-aptvc.o: sql-aptvc.cpp +sql-aptvc.so: sql-aptvc.o + $(C++) $(LDFLAGS) $(LIBS) -shared -o $@ $< +clean: + rm -f sql-aptvc.so sql-aptvc.o -clean: - rm -f sql-aptvc.so