Blame Makefile.in

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