Makefile 2.09 KB
Newer Older
1 2
#-------------------------------------------------------------------------
#
3
# Makefile for backend/catalog
4
#
5
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.41 2002/07/12 18:43:13 tgl Exp $
6 7 8
#
#-------------------------------------------------------------------------

9 10
subdir = src/backend/catalog
top_builddir = ../../..
11
include $(top_builddir)/src/Makefile.global
12

13 14 15
OBJS = catalog.o dependency.o heap.o index.o indexing.o namespace.o aclchk.o \
       pg_aggregate.o pg_constraint.o pg_conversion.o pg_depend.o \
       pg_largeobject.o pg_namespace.o pg_operator.o pg_proc.o pg_type.o
16

17
BKIFILES = postgres.bki postgres.description
18 19

all: SUBSYS.o $(BKIFILES)
20 21

SUBSYS.o: $(OBJS)
22
	$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
23

24 25 26
# Note: there are some undocumented dependencies on the ordering in which
# the catalog header files are assembled into postgres.bki.  In particular,
# indexing.h had better be last.
27

28
POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
29
	pg_proc.h pg_type.h pg_attribute.h pg_class.h \
30
	pg_attrdef.h pg_constraint.h pg_inherits.h pg_index.h \
31
	pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
32 33
	pg_language.h pg_largeobject.h pg_aggregate.h pg_statistic.h \
	pg_rewrite.h pg_trigger.h pg_listener.h pg_description.h \
34
	pg_namespace.h pg_conversion.h pg_database.h pg_shadow.h pg_group.h \
35
	pg_depend.h indexing.h \
36 37
    )

38
pg_includes := $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include)
39

40
postgres.bki postgres.description: genbki.sh $(POSTGRES_BKI_SRCS) \
41
    $(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config.h
42
	CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(BKIOPTS) -o postgres $(pg_includes) $(POSTGRES_BKI_SRCS) --set-version=$(VERSION)
43 44 45

.PHONY: install-bki
install-bki: $(BKIFILES) installdirs
46 47
	$(INSTALL_DATA) postgres.bki         $(DESTDIR)$(datadir)/postgres.bki
	$(INSTALL_DATA) postgres.description $(DESTDIR)$(datadir)/postgres.description
48 49

installdirs:
50
	$(mkinstalldirs) $(DESTDIR)$(datadir)
51 52 53

.PHONY: uninstall-bki
uninstall-bki:
54
	rm -f $(addprefix $(DESTDIR)$(datadir)/, $(BKIFILES))
55

56 57

clean: 
58
	rm -f SUBSYS.o $(OBJS) $(BKIFILES)