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	backend/replication/pgoutput \
26	fe_utils \
27	bin \
28	pl \
29	makefiles \
30	test/regress \
31	test/isolation \
32	test/perl
33
34ifeq ($(with_llvm), yes)
35SUBDIRS += backend/jit/llvm
36endif
37
38# There are too many interdependencies between the subdirectories, so
39# don't attempt parallel make here.
40.NOTPARALLEL:
41
42$(recurse)
43
44install: install-local
45
46install-local: installdirs-local
47	$(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global'
48	$(INSTALL_DATA) Makefile.port '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.port'
49	$(INSTALL_DATA) $(srcdir)/Makefile.shlib '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.shlib'
50	$(INSTALL_DATA) $(srcdir)/nls-global.mk '$(DESTDIR)$(pgxsdir)/$(subdir)/nls-global.mk'
51
52installdirs: installdirs-local
53
54installdirs-local:
55	$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
56
57uninstall: uninstall-local
58
59uninstall-local:
60	rm -f $(addprefix '$(DESTDIR)$(pgxsdir)/$(subdir)'/, Makefile.global Makefile.port Makefile.shlib nls-global.mk)
61
62distprep:
63	$(MAKE) -C test/isolation $@
64
65clean:
66	$(MAKE) -C test $@
67	$(MAKE) -C tutorial NO_PGXS=1 $@
68	$(MAKE) -C test/isolation $@
69	$(MAKE) -C test/thread $@
70
71distclean maintainer-clean:
72	$(MAKE) -C test $@
73	$(MAKE) -C tutorial NO_PGXS=1 $@
74	$(MAKE) -C test/isolation $@
75	$(MAKE) -C test/thread $@
76	rm -f Makefile.port Makefile.global
77
78
79.PHONY: install-local installdirs-local uninstall-local
80