Blame Makefile.in

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