postgresql/contrib/userlock/Makefile

67 lines
1.1 KiB
Makefile
Raw Normal View History

1997-11-06 05:38:25 +08:00
#-------------------------------------------------------------------------
#
# Makefile --
#
# Makefile for the user_locks module.
1997-11-06 05:38:25 +08:00
#
#-------------------------------------------------------------------------
PGDIR = ../..
SRCDIR = $(PGDIR)/src
include $(SRCDIR)/Makefile.global
CFLAGS += -I. $(CFLAGS_SL)
1997-11-06 05:38:25 +08:00
MODNAME = user_locks
SQLDEFS = $(MODNAME).sql
1997-11-06 05:38:25 +08:00
MODULE = $(MODNAME)$(DLSUFFIX)
MODDIR = $(LIBDIR)/modules
SQLDIR = $(LIBDIR)/sql
1997-11-06 05:38:25 +08:00
all: module sql
module: $(MODULE)
sql: $(SQLDEFS)
1997-11-06 05:38:25 +08:00
install: $(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
cp -p $(MODULE) $(MODDIR)/
strip $(MODDIR)/$(MODULE)
cp -p $(SQLDEFS) $(SQLDIR)/
1999-09-28 04:04:14 +08:00
install-doc:
if [ -d "$(DOCDIR)" ]; then \
cp -p *.doc $(DOCDIR); \
else \
cp -p *.doc $(SQLDIR); \
fi
$(MODDIR):
mkdir -p $@
$(SQLDIR):
mkdir -p $@
1997-11-06 05:38:25 +08:00
%.sql: %.sql.in
sed "s|MODULE_PATHNAME|$(MODDIR)/$(MODULE)|" < $< > $@
1997-11-06 05:38:25 +08:00
.SUFFIXES: $(DLSUFFIX)
%$(DLSUFFIX): %.c
$(CC) $(CFLAGS) -shared -o $@ $<
1997-11-06 05:38:25 +08:00
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
1997-11-06 05:38:25 +08:00
clean:
rm -f *~ $(MODULE) $(MODNAME).sql
1997-11-06 05:38:25 +08:00
ifeq (depend,$(wildcard depend))
include depend
endif