1#-------------------------------------------------------------------------
2#
3# Makefile for src
4#
5# Copyright (c) 1994, Regents of the University of California
6#
7# src/Makefile
8#
9#-------------------------------------------------------------------------
10
11subdir = src
12top_builddir = ..
13include Makefile.global
14
15SUBDIRS = \
16	common \
17	port \
18	timezone \
19	backend \
20	backend/utils/mb/conversion_procs \
21	backend/snowball \
22	include \
23	interfaces \
24	backend/replication/libpqwalreceiver \
25	fe_utils \
26	bin \
27	pl \
28	makefiles \
29	test/regress \
30	test/perl
31
32# There are too many interdependencies between the subdirectories, so
33# don't attempt parallel make here.
34.NOTPARALLEL:
35
36$(recurse)
37
38install: install-local
39
40install-local: installdirs-local
41	$(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global'
42	$(INSTALL_DATA) Makefile.port '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.port'
43	$(INSTALL_DATA) $(srcdir)/Makefile.shlib '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.shlib'
44	$(INSTALL_DATA) $(srcdir)/nls-global.mk '$(DESTDIR)$(pgxsdir)/$(subdir)/nls-global.mk'
45
46installdirs: installdirs-local
47
48installdirs-local:
49	$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
50
51uninstall: uninstall-local
52
53uninstall-local:
54	rm -f $(addprefix '$(DESTDIR)$(pgxsdir)/$(subdir)'/, Makefile.global Makefile.port Makefile.shlib nls-global.mk)
55
56distprep:
57	$(MAKE) -C test/isolation $@
58
59clean:
60	$(MAKE) -C test $@
61	$(MAKE) -C tutorial NO_PGXS=1 $@
62	$(MAKE) -C test/isolation $@
63	$(MAKE) -C test/thread $@
64
65distclean maintainer-clean:
66	$(MAKE) -C test $@
67	$(MAKE) -C tutorial NO_PGXS=1 $@
68	$(MAKE) -C test/isolation $@
69	$(MAKE) -C test/thread $@
70	rm -f Makefile.port Makefile.global
71
72coverage:
73	$(MAKE) -C timezone $@
74	$(MAKE) -C backend $@
75	$(MAKE) -C backend/utils/mb/conversion_procs $@
76	$(MAKE) -C backend/snowball $@
77	$(MAKE) -C interfaces $@
78	$(MAKE) -C backend/replication/libpqwalreceiver $@
79	$(MAKE) -C bin $@
80	$(MAKE) -C pl $@
81
82
83.PHONY: install-local installdirs-local uninstall-local
84