Blame Makefile.in

26e14f
PACKAGE 		= @package@
26e14f
NICKNAME 		= @nickname@
26e14f
PROJECT_DIR 		= @project_dir@
26e14f
SOURCE_DIR 		= @source_dir@
26e14f
GIT_REFERENCE_INDEX	= @git_reference_index@
26e14f
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
26e14f
AVOID_VERSION		= @avoid_version@
26e14f
26e14f
BUILD 			= @build@
26e14f
HOST 			= @host@
04eb52
CCHOST 			= @cchost@
26e14f
TARGET 			= @target@
26e14f
ARCH 			= @arch@
26e14f
COMPILER 		= @compiler@
26e14f
TOOLCHAIN		= @toolchain@
26e14f
SYSROOT 		= @sysroot@
26e14f
CROSS_COMPILE 		= @cross_compile@
26e14f
SHELL 			= @shell@
26e14f
26e14f
CFLAGS_COMMON 		= @cflags_common@
26e14f
CFLAGS_DEBUG 		= @cflags_debug@
26e14f
CFLAGS_CMDLINE 		= @cflags_cmdline@
26e14f
CFLAGS_CONFIG 		= @cflags_config@
26e14f
CFLAGS_SYSROOT 		= @cflags_sysroot@
26e14f
CFLAGS_OS		= @cflags_os@
26e14f
CFLAGS_SITE		= @cflags_site@
26e14f
CFLAGS_PATH 		= @cflags_path@
26e14f
CFLAGS_STRICT 		= @cflags_strict@
26e14f
CFLAGS_UTIL 		= @cflags_util@
26e14f
CFLAGS_LAST 		= @cflags_last@
26e14f
CFLAGS_ONCE 		= @cflags_once@
26e14f
26e14f
LDFLAGS_COMMON 		= @ldflags_common@
26e14f
LDFLAGS_DEBUG 		= @ldflags_debug@
26e14f
LDFLAGS_CMDLINE 	= @ldflags_cmdline@
26e14f
LDFLAGS_CONFIG 		= @ldflags_config@
26e14f
LDFLAGS_SYSROOT 	= @ldflags_sysroot@
26e14f
LDFLAGS_PATH 		= @ldflags_path@
26e14f
LDFLAGS_STRICT 		= @ldflags_strict@
26e14f
LDFLAGS_UTIL 		= @ldflags_util@
26e14f
LDFLAGS_LAST 		= @ldflags_last@
26e14f
LDFLAGS_ONCE 		= @ldflags_once@
26e14f
26e14f
PE_SUBSYSTEM 		= @pe_subsystem@
26e14f
PE_IMAGE_BASE 		= @pe_image_base@
26e14f
PE_CONFIG_DEFS  	= @pe_config_defs@
26e14f
26e14f
ELF_EH_FRAME 		= @elf_eh_frame@
26e14f
ELF_HASH_STYLE 		= @elf_hash_style@
26e14f
ELF_CONFIG_DEFS 	= @elf_config_defs@
26e14f
26e14f
PREFIX 			= @prefix@
26e14f
EXEC_PREFIX 		= @exec_prefix@
26e14f
BINDIR 			= @bindir@
035302
SBINDIR 		= @sbindir@
26e14f
LIBDIR 			= @libdir@
26e14f
INCLUDEDIR 		= @includedir@
cdceaf
OLDINCLUDEDIR 		= @oldincludedir@
26e14f
MANDIR 			= @mandir@
26e14f
DOCDIR 			= @docdir@
26e14f
LIBEXECDIR 		= @libexecdir@
26e14f
cdceaf
SYSCONFDIR		= @sysconfdir@
cdceaf
SHAREDSTATEDIR		= @sharedstatedir@
cdceaf
LOCALSTATEDIR		= @localstatedir@
cdceaf
RUNSTATEDIR		= @runstatedir@
cdceaf
DATAROOTDIR		= @datarootdir@
cdceaf
DATADIR			= @datadir@
cdceaf
INFODIR			= @infodir@
cdceaf
LOCALEDIR		= @localedir@
cdceaf
HTMLDIR			= @htmldir@
cdceaf
DVIDIR			= @dvidir@
cdceaf
PDFDIR			= @pdfdir@
cdceaf
PSDIR			= @psdir@
cdceaf
26e14f
NATIVE_CC 		= @native_cc@
26e14f
NATIVE_OS 		= @native_os@
26e14f
NATIVE_OS_BITS 		= @native_os_bits@
26e14f
NATIVE_OS_UNDERSCORE	= @native_os_underscore@
26e14f
26e14f
USER_CC                 = @user_cc@
26e14f
USER_CPP                = @user_cpp@
26e14f
USER_CXX                = @user_cxx@
26e14f
26e14f
ALL_SHARED              = @all_shared@
26e14f
ALL_STATIC              = @all_static@
26e14f
DISABLE_FRONTEND	= @disable_frontend@
26e14f
DISABLE_SHARED          = @disable_shared@
26e14f
DISABLE_STATIC          = @disable_static@
26e14f
26e14f
all:
26e14f
install:
26e14f
shared:
26e14f
static:
26e14f
26e14f
install-extras:
26e14f
install-app-extras:
26e14f
26e14f
include $(PROJECT_DIR)/sysinfo/host/$(HOST).mk
26e14f
include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk
26e14f
include $(PROJECT_DIR)/sysinfo/toolchain/$(TOOLCHAIN).mk
26e14f
include $(PROJECT_DIR)/sysinfo/os/$(OS).mk
26e14f
26e14f
include $(PROJECT_DIR)/project/osforce.mk
26e14f
26e14f
include $(PROJECT_DIR)/sofort/defs.mk
26e14f
include $(PROJECT_DIR)/sofort/version.mk
26e14f
include $(PROJECT_DIR)/sofort/custom.mk
26e14f
26e14f
include $(PROJECT_DIR)/project/tree.mk
26e14f
include $(PROJECT_DIR)/project/depends.mk
26e14f
include $(PROJECT_DIR)/project/headers.mk
26e14f
include $(PROJECT_DIR)/project/common.mk
26e14f
include $(PROJECT_DIR)/project/arch.mk
26e14f
include $(PROJECT_DIR)/project/extras.mk
26e14f
include $(PROJECT_DIR)/project/overrides.mk
26e14f
26e14f
26e14f
26e14f
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
26e14f
26e14f
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
26e14f
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
26e14f
26e14f
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
26e14f
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
26e14f
26e14f
lib/%$(OS_LIB_SUFFIX)$(VER_XYZ):
26e14f
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
26e14f
26e14f
lib/%$(OS_ARCHIVE_EXT):
26e14f
		rm -f $@
26e14f
		$(AR) rcs $@ $^
26e14f
26e14f
26e14f
26e14f
all:		package-shared package-static app
26e14f
26e14f
install:	package-install-app
26e14f
install:	package-install-extras
26e14f
install:	install-libs
26e14f
26e14f
app:		app-tag
26e14f
26e14f
app.tag:
26e14f
		cp $(PACKAGE_APP) $(APP)
26e14f
		touch app.tag
26e14f
26e14f
install-libs:	package-install-shared
26e14f
install-libs:	package-install-static
26e14f
26e14f
install-headers-default:
26e14f
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
26e14f
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
26e14f
26e14f
install-shared:	shared install-lib install-implib
26e14f
install-shared: package-install-soname package-install-solink
26e14f
install-shared: install-headers
26e14f
26e14f
install-lib:	shared
26e14f
		mkdir -p $(DESTDIR)$(LIBDIR)
26e14f
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
26e14f
26e14f
install-static:	static install-headers
26e14f
		mkdir -p $(DESTDIR)$(LIBDIR)
26e14f
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
26e14f
26e14f
install-app:	app install-app-extras
26e14f
		mkdir -p $(DESTDIR)$(BINDIR)
26e14f
		cp $(APP) $(DESTDIR)$(BINDIR)
26e14f
26e14f
install-static-app:	static-app install-app-extras
26e14f
			mkdir -p $(DESTDIR)$(BINDIR)
26e14f
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
26e14f
26e14f
26e14f
26e14f
shared:		shared-lib implib
26e14f
shared:		package-shared-soname package-shared-solink
26e14f
26e14f
static:		static-lib
26e14f
26e14f
shared-lib:	shared-objs $(SHARED_LIB)
26e14f
26e14f
shared-soname:	shared-lib $(SHARED_SONAME)
26e14f
26e14f
shared-solink:	shared-lib $(SHARED_SOLINK)
26e14f
26e14f
static-lib:	static-objs $(STATIC_LIB)
26e14f
26e14f
26e14f
26e14f
default-app:	version.tag static-objs $(DEFAULT_APP)
26e14f
26e14f
shared-app:	version.tag shared $(SHARED_APP)
26e14f
26e14f
static-app:	version.tag static-objs $(STATIC_APP)
26e14f
26e14f
26e14f
26e14f
shared-objs:	dirs $(SHARED_OBJS)
26e14f
26e14f
static-objs:	dirs $(STATIC_OBJS)
26e14f
26e14f
app-objs:	dirs $(APP_OBJS)
26e14f
26e14f
26e14f
26e14f
$(SHARED_LIB):	$(SHARED_OBJS)
26e14f
26e14f
$(STATIC_LIB):	$(STATIC_OBJS)
26e14f
26e14f
$(APP):		$(PACKAGE_APP)
26e14f
26e14f
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
26e14f
		rm -f app.tag
26e14f
		$(CC) -o $@ $^ $(LDFLAGS_APP)
26e14f
26e14f
$(SHARED_APP):	$(SHARED_LIB) $(APP_OBJS)
26e14f
		rm -f app.tag
26e14f
		$(CC) -o $@ $(APP_OBJS) -l$(PACKAGE) $(LDFLAGS_SHARED)
26e14f
26e14f
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
26e14f
		rm -f app.tag
26e14f
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
26e14f
26e14f
26e14f
dirs: 		dirs.tag
26e14f
26e14f
dirs.tag:
26e14f
		mkdir -p bin
26e14f
		mkdir -p lib
26e14f
		touch dirs.tag
26e14f
04eb52
cchost:
04eb52
		$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
04eb52
26e14f
host.tag:	Makefile
26e14f
		$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
26e14f
		touch host.tag
26e14f
26e14f
version.tag:	$(GIT_REFERENCE_INDEX)
26e14f
		$(PROJECT_DIR)/sysinfo/version.sh	\
26e14f
			-s $(SOURCE_DIR)		\
26e14f
			-o build/$(PACKAGE)_version.h	\
26e14f
			-p $(PACKAGE)
26e14f
		touch version.tag
26e14f
26e14f
distclean:	clean
26e14f
		rm -f Makefile
26e14f
26e14f
clean:		clean-implib
26e14f
		rm -f tree.tag
26e14f
		rm -f dirs.tag
26e14f
		rm -f host.tag
26e14f
		rm -f version.tag
26e14f
		rm -f app.tag
26e14f
		rm -f $(SHARED_OBJS)
26e14f
		rm -f $(STATIC_OBJS)
26e14f
		rm -f $(APP_OBJS)
26e14f
		rm -f $(SHARED_LIB)
26e14f
		rm -f $(SHARED_SONAME)
26e14f
		rm -f $(SHARED_SOLINK)
26e14f
		rm -f $(STATIC_LIB)
26e14f
		rm -f $(APP)
26e14f
		rm -f $(DEFAULT_APP)
26e14f
		rm -f $(SHARED_APP)
26e14f
		rm -f $(STATIC_APP)
26e14f
26e14f
26e14f
.display:	.display-project .display-env .display-tools .display-flags \
26e14f
		.display-pe .display-elf .display-dirs .display-build \
26e14f
		.display-config
26e14f
26e14f
.conf:		PAGER ?= less
26e14f
.conf:
26e14f
		$(MAKE) .display | $(PAGER)
26e14f
26e14f
.display-project:
26e14f
		@echo PACKAGE:'                '$(PACKAGE)
26e14f
		@echo NICKNAME:'               '$(NICKNAME)
26e14f
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
26e14f
		@echo SOURCE_DIR:'             '$(SOURCE_DIR)
26e14f
		@echo BUILD_DIR:'              '$(CURDIR)
26e14f
		@echo
26e14f
26e14f
.display-env:
26e14f
		@echo BUILD:'                  '$(BUILD)
26e14f
		@echo HOST:'                   '$(HOST)
04eb52
		@echo CCHOST:'                 '$(CCHOST)
26e14f
		@echo TARGET:'                 '$(TARGET)
26e14f
		@echo ARCH:'                   '$(ARCH)
26e14f
		@echo COMPILER:'               '$(COMPILER)
26e14f
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
26e14f
		@echo SYSROOT:'                '$(SYSROOT)
26e14f
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
26e14f
		@echo SHELL:'                  '$(SHELL)
26e14f
		@echo
26e14f
26e14f
.display-tools:
26e14f
		@echo CC:'                     '$(CC)
26e14f
		@echo CPP:'                    '$(CPP)
26e14f
		@echo CXX:'                    '$(CXX)
26e14f
		@echo
26e14f
		@echo AS:'                     '$(AS)
26e14f
		@echo AR:'                     '$(AR)
26e14f
		@echo LD:'                     '$(LD)
26e14f
		@echo NM:'                     '$(NM)
26e14f
		@echo OBJDUMP:'                '$(OBJDUMP)
26e14f
		@echo RANLIB:'                 '$(RANLIB)
26e14f
		@echo SIZE:'                   '$(SIZE)
26e14f
		@echo STRIP:'                  '$(STRIP)
26e14f
		@echo STRINGS:'                '$(STRINGS)
26e14f
		@echo
26e14f
		@echo ADDR2LINE:'              '$(ADDR2LINE)
26e14f
		@echo COV:'                    '$(COV)
26e14f
		@echo CXXFILT'                 '$(CXXFILT)
26e14f
		@echo ELFEDIT:'                '$(ELFEDIT)
26e14f
		@echo OBJCOPY:'                '$(OBJCOPY)
26e14f
		@echo READELF:'                '$(READELF)
26e14f
		@echo
26e14f
26e14f
.display-flags:
26e14f
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
26e14f
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
26e14f
		@echo CFLAGS_VERSION:'         '$(CFLAGS_VERSION)
26e14f
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
26e14f
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
26e14f
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
26e14f
		@echo CFLAGS_OS:'              '$(CFLAGS_OS)
26e14f
		@echo CFLAGS_SITE:'            '$(CFLAGS_SITE)
26e14f
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
26e14f
		@echo CFLAGS_STRICT:'          '$(CFLAGS_STRICT)
26e14f
		@echo CFLAGS_UTIL:'            '$(CFLAGS_UTIL)
26e14f
		@echo CFLAGS_LAST:'            '$(CFLAGS_LAST)
26e14f
		@echo CFLAGS_ONCE:'            '$(CFLAGS_ONCE)
26e14f
		@echo
26e14f
		@echo LDFLAGS_COMMON:'         '$(LDFLAGS_COMMON)
26e14f
		@echo LDFLAGS_DEBUG:'          '$(LDFLAGS_DEBUG)
26e14f
		@echo LDFLAGS_CMDLINE:'        '$(LDFLAGS_CMDLINE)
26e14f
		@echo LDFLAGS_CONFIG:'         '$(LDFLAGS_CONFIG)
26e14f
		@echo LDFLAGS_SYSROOT:'        '$(LDFLAGS_SYSROOT)
26e14f
		@echo LDFLAGS_PATH:'           '$(LDFLAGS_PATH)
26e14f
		@echo LDFLAGS_STRICT:'         '$(LDFLAGS_STRICT)
26e14f
		@echo LDFLAGS_UTIL:'           '$(LDFLAGS_UTIL)
26e14f
		@echo LDFLAGS_LAST:'           '$(LDFLAGS_LAST)
26e14f
		@echo LDFLAGS_ONCE:'           '$(LDFLAGS_ONCE)
26e14f
		@echo
26e14f
26e14f
.display-pe:
26e14f
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
26e14f
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
26e14f
		@echo PE_CONFIG_DEFS:'         '$(PE_CONFIG_DEFS)
26e14f
		@echo
26e14f
26e14f
.display-elf:
26e14f
		@echo ELF_EH_FRAME:'           '$(ELF_EH_FRAME)
26e14f
		@echo ELF_HASH_STYLE:'         '$(ELF_HASH_STYLE)
26e14f
		@echo ELF_CONFIG_DEFS:'        '$(ELF_CONFIG_DEFS)
26e14f
		@echo
26e14f
26e14f
.display-dirs:
26e14f
		@echo PREFIX:'                 '$(PREFIX)
26e14f
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
26e14f
		@echo BINDIR:'                 '$(BINDIR)
035302
		@echo SBINDIR:'                '$(SBINDIR)
26e14f
		@echo LIBDIR:'                 '$(LIBDIR)
26e14f
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
cdceaf
		@echo OLDINCLUDEDIR:'          '$(OLDINCLUDEDIR)
26e14f
		@echo MANDIR:'                 '$(MANDIR)
26e14f
		@echo DOCDIR:'                 '$(DOCDIR)
26e14f
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
26e14f
		@echo
26e14f
cdceaf
.display-exdirs:
cdceaf
		@echo SYSCONFDIR'              '$(SYSCONFDIR)
cdceaf
		@echo SHAREDSTATEDIR'          '$(SHAREDSTATEDIR)
cdceaf
		@echo LOCALSTATEDIR'           '$(LOCALSTATEDIR)
cdceaf
		@echo RUNSTATEDIR'             '$(RUNSTATEDIR)
cdceaf
		@echo DATAROOTDIR'             '$(DATAROOTDIR)
cdceaf
		@echo DATADIR'                 '$(DATADIR)
cdceaf
		@echo INFODIR'                 '$(INFODIR)
cdceaf
		@echo LOCALEDIR'               '$(LOCALEDIR)
cdceaf
		@echo HTMLDIR'                 '$(HTMLDIR)
cdceaf
		@echo DVIDIR'                  '$(DVIDIR)
cdceaf
		@echo PDFDIR'                  '$(PDFDIR)
cdceaf
		@echo PSDIR'                   '$(PSDIR)
cdceaf
26e14f
.display-build:
26e14f
		@echo NATIVE_CC:'              '$(NATIVE_CC)
26e14f
		@echo NATIVE_OS:'              '$(NATIVE_OS)
26e14f
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
26e14f
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
26e14f
		@echo
26e14f
		@echo USER_CC:'                '$(USER_CC)
26e14f
		@echo USER_CPP:'               '$(USER_CPP)
26e14f
		@echo USER_CXX:'               '$(USER_CXX)
26e14f
		@echo
26e14f
26e14f
.display-config:
26e14f
		@echo ALL_SHARED:'             '$(ALL_SHARED)
26e14f
		@echo ALL_STATIC:'             '$(ALL_STATIC)
26e14f
		@echo DISABLE_FRONTEND:'       '$(DISABLE_FRONTEND)
26e14f
		@echo DISABLE_SHARED:'         '$(DISABLE_SHARED)
26e14f
		@echo DISABLE_STATIC:'         '$(DISABLE_STATIC)
26e14f
26e14f
.display-host:
26e14f
		@$(CC) $(CFLAGS) -dumpmachine
26e14f
26e14f
.display-cc:
26e14f
		@echo $(CC)
26e14f
26e14f
.display-cflags:
26e14f
		@echo $(CFLAGS)
26e14f
26e14f
04eb52
.PHONY:		cchost package-app \
04eb52
		all install shared static app \
26e14f
		shared-objs shared-lib \
26e14f
		shared-soname shared-solink \
26e14f
		package-shared-soname package-shared-solink \
26e14f
		static-objs static-lib \
26e14f
		default-app shared-app static-app \
26e14f
		install-shared install-static \
26e14f
		install-soname install-solink \
26e14f
		package-install-soname package-install-solink \
26e14f
		install-headers install-app \
26e14f
		install-headers-default install-headers-custom \
26e14f
		clean distclean clean-implib version \
26e14f
		.display .conf \
26e14f
		.display-project .display-env .display-tools .display-flags \
26e14f
		.display-pe .display-elf .display-dirs .display-build \
26e14f
		implib implib-ver implib-soname implib-solink \
26e14f
		install-implib install-implib-ver \
26e14f
		install-implib-soname install-implib-solink