blob: 4117a8eac9fc8b3de250066a7c38d3b44df999a3 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for pgeasy library
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.1 1999/10/11 18:03:00 momjian Exp $
#
#-------------------------------------------------------------------------
NAME= pgeasy
SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 0
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
ifdef KRBVERS
CFLAGS+= $(KRBFLAGS)
endif
OBJS= pgeasy.o halt.o
SHLIB_LINK+= -L../libpq -lpq
SHLIB_LINK+= -L../libpq -lpq
# If crypt is a separate library, rather than part of libc, it may need
# to be referenced separately to keep (broken) linkers happy. (This is
# braindead; users of libpq should not need to know what it depends on.)
SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))
# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib
.PHONY: install install-headers
install: install-headers install-lib $(install-shlib-dep)
install-headers: pgeasy.h
@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
$(INSTALL) $(INSTLOPTS) pgeasy.h $(HEADERDIR)/pgeasy.h
.PHONY: clean
clean: clean-shlib
rm -f lib$(NAME).a $(OBJS)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
ifeq (depend,$(wildcard depend))
include depend
endif
PGEASY = pgeasy.o halt.o
TARGET = libpgeasy.a pginsert pgwordcount pgnulltest
CFLAGS = -g -Wall -I. -I../../src/interfaces/libpq -I/usr/local/pgsql/include
LDFLAGS = -L/usr/local/pgsql/lib -lpq
all : $(TARGET)
libpgeasy.a: pgeasy.o halt.o
ar r libpgeasy.a pgeasy.o halt.o
pgeasy.o: pgeasy.c
gcc -c $(CFLAGS) pgeasy.c
halt.o: halt.c
gcc -c $(CFLAGS) halt.c
pginsert: $(PGEASY) pginsert.c
gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
pgwordcount: $(PGEASY) pgwordcount.c
gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
pgnulltest: $(PGEASY) pgnulltest.c
gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
clean:
rm -f *.o $(TARGET) log core
install:
install -s -o bin -g bin $(TARGET) /usr/local/pgsql/bin
|