aboutsummaryrefslogtreecommitdiff
path: root/contrib/lo/Makefile
blob: 8bd08a3350ce85c908b2d1812085e0d184db549e (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
#
#	PostgreSQL lo type
#
#	Makefile pinched from the ip-mac contrib package
#
#	$Id: Makefile,v 1.1 1998/06/16 07:07:11 momjian Exp $

SRCDIR= ../../src

include $(SRCDIR)/Makefile.global

CONTRIBDIR=$(LIBDIR)/modules

CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include

ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
endif

TARGETS= lo$(DLSUFFIX) lo.sql

CLEANFILES+= $(TARGETS)

all:: $(TARGETS)

install:: all $(CONTRIBDIR)
	for f in *$(DLSUFFIX); do $(INSTALL) -c $$f $(CONTRIBDIR)/$$f; done

$(CONTRIBDIR):
	mkdir -p $(CONTRIBDIR)

%.sql: %.sql.in
	rm -f $@; \
	C=`pwd`; \
	sed -e "s:_OBJWD_:$(CONTRIBDIR):g" \
	    -e "s:_DLSUFFIX_:$(DLSUFFIX):g" < $< > $@

clean: 
	rm -f $(TARGETS) *.o