1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-13 18:28:01 +03:00

To fix the perpetually broken makefiles in the contrib tree, I have

written a generic framework of rules that the contrib makefiles can
use instead of writing their own each time.  You only need to set a few
variables and off you go.
This commit is contained in:
Peter Eisentraut
2001-09-06 10:49:30 +00:00
parent 22ae53d4cd
commit 17cc78ef01
32 changed files with 394 additions and 1061 deletions

View File

@@ -1,49 +1,15 @@
# $Header: /cvsroot/pgsql/contrib/dblink/Makefile,v 1.4 2001/09/06 10:49:29 petere Exp $
subdir = contrib/dblink
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include_srcdir = $(top_builddir)/src/include
MODULE_big = dblink
PG_CPPFLAGS = -I$(libpq_srcdir)
OBJS = dblink.o
SHLIB_LINK = $(libpq)
NAME := dblink
SONAME := $(NAME)$(DLSUFFIX)
DATA_built = dblink.sql
DOCS = README.dblink
override CFLAGS += -I$(srcdir)
override CFLAGS += -I$(include_srcdir)
override CFLAGS += -I$(libpq_srcdir)
override CFLAGS += $(CFLAGS_SL)
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS = $(NAME).o
SHLIB_LINK= $(libpq)
all: $(OBJS) $(SONAME) $(NAME).sql
include $(top_builddir)/src/Makefile.shlib
$(OBJS): $(NAME).c
$(CC) -o $@ -c $(CFLAGS) $<
$(NAME).sql: $(NAME).sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
install: all installdirs
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
installdirs:
$(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)/contrib
uninstall:
rm -rf $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql $(libdir)/contrib/$(SONAME)
clean distclean maintainer-clean:
rm -f $(SONAME) *.o *.sql
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
ifeq (depend,$(wildcard depend))
include depend
endif
include $(top_srcdir)/contrib/contrib-global.mk