2004-04-05 20:56:19 +00:00
|
|
|
CCFLAGS=-DHAVE_CONFIG_H -Wall -O0 -g
|
|
|
|
CCDYNAMICFLAGS=${CCFLAGS} -fPIC
|
|
|
|
LDFLAGS=
|
2004-04-06 20:35:56 +00:00
|
|
|
LDDYNAMICFLAGS=${LDFLAGS} -shared -lpq -lresolv # TODO: add the flags only when necessary
|
2004-04-05 20:56:19 +00:00
|
|
|
|
2004-04-06 20:35:56 +00:00
|
|
|
PLUGINS=random.so whois.so postgres dns.so
|
2004-04-05 20:56:19 +00:00
|
|
|
|
|
|
|
all: $(PLUGINS)
|
|
|
|
|
2004-04-06 20:30:06 +00:00
|
|
|
postgres: postgresql.so
|
|
|
|
|
2004-04-05 20:56:19 +00:00
|
|
|
%.o: %.c
|
|
|
|
${CC} ${CCDYNAMICFLAGS} -c -o $@ $<
|
|
|
|
|
|
|
|
%.so: %.o
|
|
|
|
${CC} ${LDDYNAMICFLAGS} -o $@ $<
|
|
|
|
|
2004-04-06 20:30:06 +00:00
|
|
|
test-postgresql: test-postgresql.o
|
|
|
|
${CC} -o $@ -l pq $<
|
|
|
|
|
2004-04-05 20:56:19 +00:00
|
|
|
clean:
|
|
|
|
-rm -f *.o *.so program
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
-rm -f *~
|
|
|
|
|
|
|
|
.SECONDARY: ${OBJECTS}
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
|