From f3f0f3015f87149216beb70a9e57e8e4e4d00660 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 10 May 2016 17:27:23 -0400 Subject: build system: moved core definition files to a designated folder. --- Makefile.in | 6 ++--- project/custom.mk | 76 ------------------------------------------------------ project/defs.mk | 64 --------------------------------------------- project/version.mk | 63 -------------------------------------------- sofort/custom.mk | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ sofort/defs.mk | 64 +++++++++++++++++++++++++++++++++++++++++++++ sofort/version.mk | 63 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 206 insertions(+), 206 deletions(-) delete mode 100644 project/custom.mk delete mode 100644 project/defs.mk delete mode 100644 project/version.mk create mode 100644 sofort/custom.mk create mode 100644 sofort/defs.mk create mode 100644 sofort/version.mk diff --git a/Makefile.in b/Makefile.in index 418a787..9f87f7f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -79,9 +79,9 @@ include $(PROJECT_DIR)/sysinfo/host/$(HOST).mk include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk include $(PROJECT_DIR)/sysinfo/toolchain/$(TOOLCHAIN).mk -include $(PROJECT_DIR)/project/defs.mk -include $(PROJECT_DIR)/project/version.mk -include $(PROJECT_DIR)/project/custom.mk +include $(PROJECT_DIR)/sofort/defs.mk +include $(PROJECT_DIR)/sofort/version.mk +include $(PROJECT_DIR)/sofort/custom.mk include $(PROJECT_DIR)/project/tree.mk include $(PROJECT_DIR)/project/depends.mk diff --git a/project/custom.mk b/project/custom.mk deleted file mode 100644 index 8e0bbc4..0000000 --- a/project/custom.mk +++ /dev/null @@ -1,76 +0,0 @@ -ifeq ($(OS_BINFMT),PE) -include $(PROJECT_DIR)/sysinfo/os/pe.mk -endif - -ifeq ($(OS_BINFMT),ELF) -include $(PROJECT_DIR)/sysinfo/os/elf.mk -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 - - - -ifeq ($(DISABLE_FRONTEND),yes) -app-tag: -package-install-app: -package-install-extras: -else -app-tag: package-app app.tag -package-install-app: install-app -package-install-extras: install-extras -endif - - - -ifeq ($(ALL_STATIC),yes) - -package-app: static-app -app: PACKAGE_APP = $(STATIC_APP) -app-tag: PACKAGE_APP = $(STATIC_APP) -app.tag: $(STATIC_APP) - - -else ifeq ($(ALL_SHARED),yes) - -package-app: shared-app -app: PACKAGE_APP = $(SHARED_APP) -app-tag: PACKAGE_APP = $(SHARED_APP) -app.tag: $(SHARED_APP) - - -else - -package-app: default-app -app: PACKAGE_APP = $(DEFAULT_APP) -app-tag: PACKAGE_APP = $(DEFAULT_APP) -app.tag: $(DEFAULT_APP) - -endif - - - -ifeq ($(CUSTOM_INSTALL_HEADERS),yes) - -install-headers:install-headers-custom - -else - -install-headers:install-headers-default - -endif diff --git a/project/defs.mk b/project/defs.mk deleted file mode 100644 index 11cec0f..0000000 --- a/project/defs.mk +++ /dev/null @@ -1,64 +0,0 @@ -SHARED_LIB_DEPS = -SHARED_APP_DEPS = -STATIC_APP_DEPS = - -COMMON_LOBJS = $(COMMON_SRCS:.c=.lo) -COMMON_OBJS = $(COMMON_SRCS:.c=.o) - -ARCH_LOBJS = $(ARCH_SRCS:.c=.lo) -ARCH_OBJS = $(ARCH_SRCS:.c=.o) - -APP_LOBJS = $(APP_SRCS:.c=.lo) -APP_OBJS = $(APP_SRCS:.c=.o) - -SHARED_OBJS = $(COMMON_LOBJS) $(ARCH_LOBJS) -STATIC_OBJS = $(COMMON_OBJS) $(ARCH_OBJS) - -STATIC_LIB = lib/$(OS_LIB_PREFIX)$(PACKAGE)$(OS_ARCHIVE_EXT) - -DSO_VER = $(OS_LIB_PREFIX)$(PACKAGE)$(OS_LIB_SUFFIX)$(VER_XYZ) -DSO_SONAME = $(OS_LIB_PREFIX)$(PACKAGE)$(OS_LIB_SUFFIX)$(VER_SONAME) -DSO_SOLINK = $(OS_LIB_PREFIX)$(PACKAGE)$(OS_LIB_SUFFIX) - -SHARED_LIB = lib/$(DSO_VER) -SHARED_SONAME = lib/$(DSO_SONAME) -SHARED_SOLINK = lib/$(DSO_SOLINK) - -IMP_DEF = $(OS_LIB_PREFIX)$(PACKAGE)$(VER_XYZ)$(OS_LIBDEF_EXT) -IMP_VER = $(OS_LIB_PREFIX)$(PACKAGE)$(VER_XYZ)$(OS_IMPLIB_EXT) -IMP_SONAME = $(OS_LIB_PREFIX)$(PACKAGE)$(VER_SONAME)$(OS_IMPLIB_EXT) -IMP_SOLINK = $(OS_LIB_PREFIX)$(PACKAGE)$(OS_IMPLIB_EXT) - -IMPLIB_DEF = lib/$(IMP_DEF) -IMPLIB_VER = lib/$(IMP_VER) -IMPLIB_SONAME = lib/$(IMP_SONAME) -IMPLIB_SOLINK = lib/$(IMP_SOLINK) - -APP = bin/$(OS_APP_PREFIX)$(NICKNAME)$(OS_APP_SUFFIX) -DEFAULT_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-default$(OS_APP_SUFFIX) -SHARED_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-shared$(OS_APP_SUFFIX) -STATIC_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-static$(OS_APP_SUFFIX) - -CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_CONFIG) $(CFLAGS_SYSROOT) \ - $(CFLAGS_COMMON) $(CFLAGS_CMDLINE) $(CFLAGS_HOST) \ - $(CFLAGS_PATH) $(CFLAGS_OS) $(CFLAGS_SITE) \ - $(CFLAGS_VERSION) $(CFLAGS_STRICT) - -CFLAGS_SHARED = $(CFLAGS) $(CFLAGS_PIC) $(CFLAGS_SHARED_ATTR) -CFLAGS_STATIC = $(CFLAGS) $(CFLAGS_OBJ) $(CFLAGS_STATIC_ATTR) -CFLAGS_APP = $(CFLAGS) $(CFLAGS_OBJ) $(CFLAGS_APP_ATTR) $(CFLAGS_UTIL) - -LDFLAGS_SHARED = $(LDFLAGS_DEBUG) $(LDFLAGS_CONFIG) $(LDFLAGS_SYSROOT) \ - $(LDFLAGS_COMMON) $(LDFLAGS_CMDLINE) $(LDFLAGS_HOST) \ - $(LDFLAGS_PATH) $(SHARED_LIB_DEPS) $(LDFLAGS_STRICT) \ - $(LDFLAGS_LAST) - -LDFLAGS_APP = $(LDFLAGS_DEBUG) $(LDFLAGS_CONFIG) $(LDFLAGS_SYSROOT) \ - $(LDFLAGS_COMMON) $(LDFLAGS_CMDLINE) $(LDFLAGS_HOST) \ - $(LDFLAGS_PATH) $(SHARED_APP_DEPS) $(LDFLAGS_STRICT) \ - $(LDFLAGS_UTIL) $(LDFLAGS_LAST) - -LDFLAGS_STATIC = $(LDFLAGS_DEBUG) $(LDFLAGS_CONFIG) $(LDFLAGS_SYSROOT) \ - $(LDFLAGS_COMMON) $(LDFLAGS_CMDLINE) $(LDFLAGS_HOST) \ - $(LDFLAGS_PATH) $(STATIC_APP_DEPS) $(LDFLAGS_STRICT) \ - $(LDFLAGS_LAST) diff --git a/project/version.mk b/project/version.mk deleted file mode 100644 index 930a295..0000000 --- a/project/version.mk +++ /dev/null @@ -1,63 +0,0 @@ -include $(PROJECT_DIR)/project/tagver.mk - -CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_MAJOR=$(VER_MAJOR) -CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_MINOR=$(VER_MINOR) -CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_PATCH=$(VER_PATCH) - -ifeq ($(AVOID_VERSION),yes) - -VER_XYZ = -VER_SONAME = - -package-shared-soname: -package-shared-solink: -package-install-soname: -package-install-solink: - -else - -VER_XYZ = .$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) -VER_SONAME = .$(VER_MAJOR) - -package-shared-soname: shared-soname -package-shared-solink: shared-solink -package-install-soname: install-soname -package-install-solink: install-solink - - - -# libfoo.so (common) -install-solink: install-lib - rm -f $@.tmp - ln -s $(DSO_VER) $@.tmp - mv $@.tmp $(DESTDIR)$(LIBDIR)/$(DSO_SOLINK) - -$(SHARED_SOLINK): $(SHARED_LIB) - rm -f $@.tmp - ln -s $(DSO_VER) $@.tmp - mv $@.tmp $@ - -# libfoo.so.x (symlink) -ifeq ($(OS_SONAME),symlink) -$(SHARED_SONAME): $(SHARED_LIB) - rm -f $@.tmp - ln -s $(DSO_VER) $@.tmp - mv $@.tmp $@ - -install-soname: install-lib - rm -f $@.tmp - ln -s $(DSO_VER) $@.tmp - mv $@.tmp $(DESTDIR)$(LIBDIR)/$(DSO_SONAME) -endif - - -# libfoo.so.x (copy) -ifeq ($(OS_SONAME),copy) -install-soname: install-lib - cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)/$(DSO_SONAME) - -$(SHARED_SONAME): $(SHARED_LIB) - cp $(SHARED_LIB) $(SHARED_SONAME) -endif - -endif diff --git a/sofort/custom.mk b/sofort/custom.mk new file mode 100644 index 0000000..8e0bbc4 --- /dev/null +++ b/sofort/custom.mk @@ -0,0 +1,76 @@ +ifeq ($(OS_BINFMT),PE) +include $(PROJECT_DIR)/sysinfo/os/pe.mk +endif + +ifeq ($(OS_BINFMT),ELF) +include $(PROJECT_DIR)/sysinfo/os/elf.mk +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 + + + +ifeq ($(DISABLE_FRONTEND),yes) +app-tag: +package-install-app: +package-install-extras: +else +app-tag: package-app app.tag +package-install-app: install-app +package-install-extras: install-extras +endif + + + +ifeq ($(ALL_STATIC),yes) + +package-app: static-app +app: PACKAGE_APP = $(STATIC_APP) +app-tag: PACKAGE_APP = $(STATIC_APP) +app.tag: $(STATIC_APP) + + +else ifeq ($(ALL_SHARED),yes) + +package-app: shared-app +app: PACKAGE_APP = $(SHARED_APP) +app-tag: PACKAGE_APP = $(SHARED_APP) +app.tag: $(SHARED_APP) + + +else + +package-app: default-app +app: PACKAGE_APP = $(DEFAULT_APP) +app-tag: PACKAGE_APP = $(DEFAULT_APP) +app.tag: $(DEFAULT_APP) + +endif + + + +ifeq ($(CUSTOM_INSTALL_HEADERS),yes) + +install-headers:install-headers-custom + +else + +install-headers:install-headers-default + +endif diff --git a/sofort/defs.mk b/sofort/defs.mk new file mode 100644 index 0000000..11cec0f --- /dev/null +++ b/sofort/defs.mk @@ -0,0 +1,64 @@ +SHARED_LIB_DEPS = +SHARED_APP_DEPS = +STATIC_APP_DEPS = + +COMMON_LOBJS = $(COMMON_SRCS:.c=.lo) +COMMON_OBJS = $(COMMON_SRCS:.c=.o) + +ARCH_LOBJS = $(ARCH_SRCS:.c=.lo) +ARCH_OBJS = $(ARCH_SRCS:.c=.o) + +APP_LOBJS = $(APP_SRCS:.c=.lo) +APP_OBJS = $(APP_SRCS:.c=.o) + +SHARED_OBJS = $(COMMON_LOBJS) $(ARCH_LOBJS) +STATIC_OBJS = $(COMMON_OBJS) $(ARCH_OBJS) + +STATIC_LIB = lib/$(OS_LIB_PREFIX)$(PACKAGE)$(OS_ARCHIVE_EXT) + +DSO_VER = $(OS_LIB_PREFIX)$(PACKAGE)$(OS_LIB_SUFFIX)$(VER_XYZ) +DSO_SONAME = $(OS_LIB_PREFIX)$(PACKAGE)$(OS_LIB_SUFFIX)$(VER_SONAME) +DSO_SOLINK = $(OS_LIB_PREFIX)$(PACKAGE)$(OS_LIB_SUFFIX) + +SHARED_LIB = lib/$(DSO_VER) +SHARED_SONAME = lib/$(DSO_SONAME) +SHARED_SOLINK = lib/$(DSO_SOLINK) + +IMP_DEF = $(OS_LIB_PREFIX)$(PACKAGE)$(VER_XYZ)$(OS_LIBDEF_EXT) +IMP_VER = $(OS_LIB_PREFIX)$(PACKAGE)$(VER_XYZ)$(OS_IMPLIB_EXT) +IMP_SONAME = $(OS_LIB_PREFIX)$(PACKAGE)$(VER_SONAME)$(OS_IMPLIB_EXT) +IMP_SOLINK = $(OS_LIB_PREFIX)$(PACKAGE)$(OS_IMPLIB_EXT) + +IMPLIB_DEF = lib/$(IMP_DEF) +IMPLIB_VER = lib/$(IMP_VER) +IMPLIB_SONAME = lib/$(IMP_SONAME) +IMPLIB_SOLINK = lib/$(IMP_SOLINK) + +APP = bin/$(OS_APP_PREFIX)$(NICKNAME)$(OS_APP_SUFFIX) +DEFAULT_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-default$(OS_APP_SUFFIX) +SHARED_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-shared$(OS_APP_SUFFIX) +STATIC_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-static$(OS_APP_SUFFIX) + +CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_CONFIG) $(CFLAGS_SYSROOT) \ + $(CFLAGS_COMMON) $(CFLAGS_CMDLINE) $(CFLAGS_HOST) \ + $(CFLAGS_PATH) $(CFLAGS_OS) $(CFLAGS_SITE) \ + $(CFLAGS_VERSION) $(CFLAGS_STRICT) + +CFLAGS_SHARED = $(CFLAGS) $(CFLAGS_PIC) $(CFLAGS_SHARED_ATTR) +CFLAGS_STATIC = $(CFLAGS) $(CFLAGS_OBJ) $(CFLAGS_STATIC_ATTR) +CFLAGS_APP = $(CFLAGS) $(CFLAGS_OBJ) $(CFLAGS_APP_ATTR) $(CFLAGS_UTIL) + +LDFLAGS_SHARED = $(LDFLAGS_DEBUG) $(LDFLAGS_CONFIG) $(LDFLAGS_SYSROOT) \ + $(LDFLAGS_COMMON) $(LDFLAGS_CMDLINE) $(LDFLAGS_HOST) \ + $(LDFLAGS_PATH) $(SHARED_LIB_DEPS) $(LDFLAGS_STRICT) \ + $(LDFLAGS_LAST) + +LDFLAGS_APP = $(LDFLAGS_DEBUG) $(LDFLAGS_CONFIG) $(LDFLAGS_SYSROOT) \ + $(LDFLAGS_COMMON) $(LDFLAGS_CMDLINE) $(LDFLAGS_HOST) \ + $(LDFLAGS_PATH) $(SHARED_APP_DEPS) $(LDFLAGS_STRICT) \ + $(LDFLAGS_UTIL) $(LDFLAGS_LAST) + +LDFLAGS_STATIC = $(LDFLAGS_DEBUG) $(LDFLAGS_CONFIG) $(LDFLAGS_SYSROOT) \ + $(LDFLAGS_COMMON) $(LDFLAGS_CMDLINE) $(LDFLAGS_HOST) \ + $(LDFLAGS_PATH) $(STATIC_APP_DEPS) $(LDFLAGS_STRICT) \ + $(LDFLAGS_LAST) diff --git a/sofort/version.mk b/sofort/version.mk new file mode 100644 index 0000000..930a295 --- /dev/null +++ b/sofort/version.mk @@ -0,0 +1,63 @@ +include $(PROJECT_DIR)/project/tagver.mk + +CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_MAJOR=$(VER_MAJOR) +CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_MINOR=$(VER_MINOR) +CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_PATCH=$(VER_PATCH) + +ifeq ($(AVOID_VERSION),yes) + +VER_XYZ = +VER_SONAME = + +package-shared-soname: +package-shared-solink: +package-install-soname: +package-install-solink: + +else + +VER_XYZ = .$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH) +VER_SONAME = .$(VER_MAJOR) + +package-shared-soname: shared-soname +package-shared-solink: shared-solink +package-install-soname: install-soname +package-install-solink: install-solink + + + +# libfoo.so (common) +install-solink: install-lib + rm -f $@.tmp + ln -s $(DSO_VER) $@.tmp + mv $@.tmp $(DESTDIR)$(LIBDIR)/$(DSO_SOLINK) + +$(SHARED_SOLINK): $(SHARED_LIB) + rm -f $@.tmp + ln -s $(DSO_VER) $@.tmp + mv $@.tmp $@ + +# libfoo.so.x (symlink) +ifeq ($(OS_SONAME),symlink) +$(SHARED_SONAME): $(SHARED_LIB) + rm -f $@.tmp + ln -s $(DSO_VER) $@.tmp + mv $@.tmp $@ + +install-soname: install-lib + rm -f $@.tmp + ln -s $(DSO_VER) $@.tmp + mv $@.tmp $(DESTDIR)$(LIBDIR)/$(DSO_SONAME) +endif + + +# libfoo.so.x (copy) +ifeq ($(OS_SONAME),copy) +install-soname: install-lib + cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)/$(DSO_SONAME) + +$(SHARED_SONAME): $(SHARED_LIB) + cp $(SHARED_LIB) $(SHARED_SONAME) +endif + +endif -- cgit v1.2.3