postgresql/contrib/userlock/Makefile

65 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
INCLUDE_OPT = -I ./ \
-I $(SRCDIR)/ \
-I $(SRCDIR)/include \
-I $(SRCDIR)/port/$(PORTNAME)
CFLAGS += $(INCLUDE_OPT) $(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)/
$(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 $(INCLUDE_OPT) *.c >depend
clean:
rm -f *~ $(MODULE) $(MODNAME).sql
1997-11-06 05:38:25 +08:00
ifeq (depend,$(wildcard depend))
include depend
endif