1997-11-06 05:38:25 +08:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
1998-08-31 03:37:51 +08:00
|
|
|
# Makefile --
|
1999-06-06 03:09:48 +08:00
|
|
|
#
|
1998-08-31 03:37:51 +08:00
|
|
|
# Makefile for the user_locks module.
|
1997-11-06 05:38:25 +08:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
PGDIR = ../..
|
|
|
|
SRCDIR = $(PGDIR)/src
|
|
|
|
|
|
|
|
include $(SRCDIR)/Makefile.global
|
|
|
|
|
2000-05-29 13:45:56 +08:00
|
|
|
CFLAGS += -I. $(CFLAGS_SL)
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
MODNAME = user_locks
|
|
|
|
|
1999-06-06 03:09:48 +08:00
|
|
|
SQLDEFS = $(MODNAME).sql
|
|
|
|
|
1997-11-06 05:38:25 +08:00
|
|
|
MODULE = $(MODNAME)$(DLSUFFIX)
|
|
|
|
|
1998-08-31 03:37:51 +08:00
|
|
|
MODDIR = $(LIBDIR)/modules
|
|
|
|
|
|
|
|
SQLDIR = $(LIBDIR)/sql
|
|
|
|
|
1997-11-06 05:38:25 +08:00
|
|
|
all: module sql
|
|
|
|
|
|
|
|
module: $(MODULE)
|
|
|
|
|
1999-06-06 03:09:48 +08:00
|
|
|
sql: $(SQLDEFS)
|
1997-11-06 05:38:25 +08:00
|
|
|
|
1999-06-06 03:09:48 +08:00
|
|
|
install: $(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
|
1998-08-31 03:37:51 +08:00
|
|
|
cp -p $(MODULE) $(MODDIR)/
|
|
|
|
strip $(MODDIR)/$(MODULE)
|
1999-06-06 03:09:48 +08:00
|
|
|
cp -p $(SQLDEFS) $(SQLDIR)/
|
1998-08-31 03:37:51 +08:00
|
|
|
|
1999-09-28 04:04:14 +08:00
|
|
|
install-doc:
|
|
|
|
if [ -d "$(DOCDIR)" ]; then \
|
|
|
|
cp -p *.doc $(DOCDIR); \
|
|
|
|
else \
|
|
|
|
cp -p *.doc $(SQLDIR); \
|
|
|
|
fi
|
|
|
|
|
1998-08-31 03:37:51 +08:00
|
|
|
$(MODDIR):
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
$(SQLDIR):
|
|
|
|
mkdir -p $@
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
%.sql: %.sql.in
|
1998-08-31 03:37:51 +08:00
|
|
|
sed "s|MODULE_PATHNAME|$(MODDIR)/$(MODULE)|" < $< > $@
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
.SUFFIXES: $(DLSUFFIX)
|
|
|
|
|
|
|
|
%$(DLSUFFIX): %.c
|
From: Jun Kuwamura <juk@rccm.co.jp>
This patch fix the Makefiles in contrib/{pginterface, spi,
miscutil, int8, ip_and_mac, sequence, soundex, string, userlock,
array, datetime} to install their modules in one directory(lib/modules/).
1998-04-22 12:16:46 +08:00
|
|
|
$(CC) $(CFLAGS) -shared -o $@ $<
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
depend dep:
|
2000-05-29 13:45:56 +08:00
|
|
|
$(CC) -MM $(CFLAGS) *.c >depend
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
clean:
|
1998-08-31 03:37:51 +08:00
|
|
|
rm -f *~ $(MODULE) $(MODNAME).sql
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
|
|
include depend
|
|
|
|
endif
|