From 5b28e8fd50ed261e2025a59fd5d267c32522930f Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 5 May 2016 19:02:54 -0400 Subject: build system: Makefile.in, custom.mk: added --disable-[shared|static] support. --- Makefile.in | 26 ++++++++++++++++++++------ project/custom.mk | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index 5a02d0f..e507a8d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -55,6 +55,10 @@ USER_CC = @user_cc@ USER_CPP = @user_cpp@ USER_CXX = @user_cxx@ +ALL_SHARED = @all_shared@ +ALL_STATIC = @all_static@ +DISABLE_SHARED = @disable_shared@ +DISABLE_STATIC = @disable_static@ all: install: @@ -63,7 +67,6 @@ static: install-extras: install-app-extras: -install-libs-extras: include $(PROJECT_DIR)/sysinfo/host/$(HOST).mk include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk @@ -100,9 +103,11 @@ lib/%$(OS_ARCHIVE_EXT): -all: shared static app +all: package-shared package-static app -install: install-libs install-headers install-app install-extras +install: install-app +install: install-extras +install: install-libs app: package-app app-tag @@ -112,9 +117,11 @@ app.tag: package-app cp $(PACKAGE_APP) $(APP) touch app.tag -install-libs: install-shared install-static install-libs-extras +install-libs: package-install-shared +install-libs: package-install-static +install-libs: package-install-headers -install-headers:shared static +install-headers:package-shared package-static mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE) cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE) @@ -227,7 +234,8 @@ clean: clean-implib .display: .display-project .display-env .display-tools .display-flags \ - .display-pe .display-elf .display-dirs .display-build + .display-pe .display-elf .display-dirs .display-build \ + .display-config .display-project: @echo PACKAGE:' '$(PACKAGE) @@ -324,6 +332,12 @@ clean: clean-implib @echo USER_CXX:' '$(USER_CXX) @echo +.display-config: + @echo ALL_SHARED:' '$(ALL_SHARED) + @echo ALL_STATIC:' '$(ALL_STATIC) + @echo DISABLE_SHARED:' '$(DISABLE_SHARED) + @echo DISABLE_STATIC:' '$(DISABLE_STATIC) + .display-host: @$(CC) $(CFLAGS) -dumpmachine diff --git a/project/custom.mk b/project/custom.mk index e58f88c..056855d 100644 --- a/project/custom.mk +++ b/project/custom.mk @@ -8,6 +8,34 @@ endif +ifeq ($(DISABLE_STATIC),yes) +package-static: +package-install-static: +else +package-static: static +package-install-static: install-static +endif + +ifeq ($(DISABLE_SHARED),yes) +package-shared: +package-install-shared: +else +package-shared: shared +package-install-shared: install-shared +endif + +ifneq ($(DISABLE_STATIC),yes) +package-install-headers:install-headers + +else ifneq ($(DISABLE_SHARED),yes) +package-install-headers:install-headers + +else +package-install-headers: +endif + + + ifeq ($(ALL_STATIC),yes) package-app: static-app -- cgit v1.2.3