summaryrefslogtreecommitdiff
path: root/contrib/pginterface/Makefile
blob: a13b336fb2f238c2f602b4d98fd656e15b657217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#
# Makefile
#
#
PGINTERFACE = pginterface.o halt.o 
TARGET = pginsert pgwordcount pgnulltest
CFLAGS = -g -fpic -Wall -I. -I../../src/interfaces/libpq  -I/usr/local/pgsql/include
LDFLAGS = -L/usr/local/pgsql/lib -lpq

all : $(TARGET)

pginsert:	$(PGINTERFACE) pginsert.c
	gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)

pgwordcount:	$(PGINTERFACE) pgwordcount.c
	gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)

pgnulltest:	$(PGINTERFACE) pgnulltest.c
	gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)

pginterface.o:	pginterface.c
	gcc -c $(CFLAGS) pginterface.c

halt.o:	halt.c
	gcc -c $(CFLAGS) halt.c

clean:
	rm -f *.o $(TARGET) log core

install:
	install -s -o bin -g bin $(TARGET) /usr/local/pgsql/bin