Blame Makefile.in

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