2020-09-25 03:29:13 +08:00
|
|
|
subdir = .
|
|
|
|
top_builddir = .
|
|
|
|
include src/Makefile.global
|
|
|
|
|
|
|
|
ifeq ($(LIBPQ_LIBRARY_TYPE), static)
|
|
|
|
LIBPQ_INSTALL_LIBS = install-stlib
|
|
|
|
endif
|
|
|
|
|
2021-04-20 08:19:44 +08:00
|
|
|
ifeq ($(LIBPQ_LIBRARY_TYPE), shared)
|
2023-06-01 10:55:03 +08:00
|
|
|
ifeq ($(LIBPQ_USING_MINGW), yes)
|
2021-04-20 08:19:44 +08:00
|
|
|
# The import library name is the same as the static library name
|
|
|
|
EXTRA_TARGET = install-lib-static
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-09-25 03:29:13 +08:00
|
|
|
.PHONY: all
|
|
|
|
all:
|
2023-06-01 10:55:03 +08:00
|
|
|
$(MAKE) -C src/include
|
|
|
|
$(MAKE) -C src/common
|
|
|
|
$(MAKE) -C src/port
|
|
|
|
$(MAKE) -C src/interfaces/libpq all-$(LIBPQ_LIBRARY_TYPE)-lib
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/include
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/pgtypeslib
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/ecpglib
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/compatlib
|
|
|
|
ifeq ($(LIBPQ_ENABLE_TOOLS), yes)
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/preproc
|
|
|
|
$(MAKE) -C src/fe_utils
|
|
|
|
$(MAKE) -C src/bin
|
|
|
|
else
|
|
|
|
$(MAKE) -C src/bin/pg_config
|
|
|
|
endif
|
2020-09-25 03:29:13 +08:00
|
|
|
|
|
|
|
.PHONY: install-stlib
|
|
|
|
install-stlib:
|
2023-06-01 10:55:03 +08:00
|
|
|
$(MAKE) -C src/common install -o all
|
2020-09-25 03:29:13 +08:00
|
|
|
rm -f '$(DESTDIR)$(libdir)/libpgcommon_shlib.a'
|
2023-06-01 10:55:03 +08:00
|
|
|
$(MAKE) -C src/port install -o all
|
2020-09-25 03:29:13 +08:00
|
|
|
rm -f '$(DESTDIR)$(libdir)/libpgport_shlib.a'
|
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: $(LIBPQ_INSTALL_LIBS)
|
2023-06-01 10:55:03 +08:00
|
|
|
$(MAKE) -C src/include install
|
|
|
|
$(MAKE) -C src/interfaces/libpq $(EXTRA_TARGET) install-lib-$(LIBPQ_LIBRARY_TYPE) install-lib-pc install -o all -o install-lib
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/include install
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/pgtypeslib install
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/ecpglib install
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/compatlib install
|
|
|
|
ifeq ($(LIBPQ_ENABLE_TOOLS), yes)
|
|
|
|
$(MAKE) -C src/interfaces/ecpg/preproc install
|
|
|
|
$(MAKE) -C src/bin install
|
|
|
|
else
|
|
|
|
$(MAKE) -C src/bin/pg_config install
|
|
|
|
endif
|