Blame Makefile.in

f46039
PACKAGE 		= @package@
78fd02
NICKNAME 		= @nickname@
f46039
PROJECT_DIR 		= @project_dir@
11deae
SOURCE_DIR 		= @source_dir@
269f6f
GIT_REFERENCE_INDEX	= @git_reference_index@
8dc59e
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
832c05
AVOID_VERSION		= @avoid_version@
f46039
f46039
BUILD 			= @build@
f46039
HOST 			= @host@
f46039
TARGET 			= @target@
f46039
ARCH 			= @arch@
e83fbe
COMPILER 		= @compiler@
46d732
TOOLCHAIN		= @toolchain@
f46039
SYSROOT 		= @sysroot@
f46039
CROSS_COMPILE 		= @cross_compile@
f46039
SHELL 			= @shell@
f46039
f46039
CFLAGS_COMMON 		= @cflags_common@
bbe942
CFLAGS_DEBUG 		= @cflags_debug@
f46039
CFLAGS_CMDLINE 		= @cflags_cmdline@
f46039
CFLAGS_CONFIG 		= @cflags_config@
f46039
CFLAGS_SYSROOT 		= @cflags_sysroot@
e6d235
CFLAGS_OS		= @cflags_os@
e6d235
CFLAGS_SITE		= @cflags_site@
f46039
CFLAGS_PATH 		= @cflags_path@
616138
CFLAGS_STRICT 		= @cflags_strict@
a5b647
CFLAGS_UTIL 		= @cflags_util@
1ec01b
CFLAGS_LAST 		= @cflags_last@
1ec01b
CFLAGS_ONCE 		= @cflags_once@
f46039
f46039
LDFLAGS_COMMON 		= @ldflags_common@
bbe942
LDFLAGS_DEBUG 		= @ldflags_debug@
f46039
LDFLAGS_CMDLINE 	= @ldflags_cmdline@
f46039
LDFLAGS_CONFIG 		= @ldflags_config@
f46039
LDFLAGS_SYSROOT 	= @ldflags_sysroot@
f46039
LDFLAGS_PATH 		= @ldflags_path@
616138
LDFLAGS_STRICT 		= @ldflags_strict@
a5b647
LDFLAGS_UTIL 		= @ldflags_util@
1ec01b
LDFLAGS_LAST 		= @ldflags_last@
1ec01b
LDFLAGS_ONCE 		= @ldflags_once@
f46039
f46039
PE_SUBSYSTEM 		= @pe_subsystem@
f46039
PE_IMAGE_BASE 		= @pe_image_base@
f46039
PE_CONFIG_DEFS  	= @pe_config_defs@
f46039
f46039
ELF_EH_FRAME 		= @elf_eh_frame@
f46039
ELF_HASH_STYLE 		= @elf_hash_style@
f46039
ELF_CONFIG_DEFS 	= @elf_config_defs@
f46039
f46039
PREFIX 			= @prefix@
b6d1b5
EXEC_PREFIX 		= @exec_prefix@
f46039
BINDIR 			= @bindir@
f46039
LIBDIR 			= @libdir@
f46039
INCLUDEDIR 		= @includedir@
f46039
MANDIR 			= @mandir@
f46039
DOCDIR 			= @docdir@
f46039
LIBEXECDIR 		= @libexecdir@
f46039
f46039
NATIVE_CC 		= @native_cc@
f46039
NATIVE_OS 		= @native_os@
f46039
NATIVE_OS_BITS 		= @native_os_bits@
f46039
NATIVE_OS_UNDERSCORE	= @native_os_underscore@
f46039
f46039
USER_CC                 = @user_cc@
f46039
USER_CPP                = @user_cpp@
f46039
USER_CXX                = @user_cxx@
f46039
a8ab0d
ALL_SHARED              = @all_shared@
a8ab0d
ALL_STATIC              = @all_static@
54c1e4
DISABLE_FRONTEND	= @disable_frontend@
a8ab0d
DISABLE_SHARED          = @disable_shared@
a8ab0d
DISABLE_STATIC          = @disable_static@
f46039
f46039
all:
f46039
install:
f46039
shared:
f46039
static:
f46039
bdd4bb
install-extras:
bdd4bb
install-app-extras:
f46039
f46039
include $(PROJECT_DIR)/sysinfo/host/$(HOST).mk
e83fbe
include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk
46d732
include $(PROJECT_DIR)/sysinfo/toolchain/$(TOOLCHAIN).mk
f46039
8e6b56
include $(PROJECT_DIR)/project/osforce.mk
8e6b56
ea0e7b
include $(PROJECT_DIR)/sofort/defs.mk
ea0e7b
include $(PROJECT_DIR)/sofort/version.mk
ea0e7b
include $(PROJECT_DIR)/sofort/custom.mk
b2d0f4
f46039
include $(PROJECT_DIR)/project/tree.mk
f46039
include $(PROJECT_DIR)/project/depends.mk
f46039
include $(PROJECT_DIR)/project/headers.mk
f46039
include $(PROJECT_DIR)/project/common.mk
f46039
include $(PROJECT_DIR)/project/arch.mk
f46039
include $(PROJECT_DIR)/project/extras.mk
f46039
include $(PROJECT_DIR)/project/overrides.mk
f46039
f46039
f46039
f46039
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
f46039
11deae
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
f46039
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
f46039
11deae
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
f46039
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
f46039
225022
lib/%$(OS_LIB_SUFFIX)$(VER_XYZ):
f46039
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
f46039
1b0fc6
lib/%$(OS_ARCHIVE_EXT):
f46039
		rm -f $@
c0cc78
		$(AR) rcs $@ $^
f46039
f46039
f46039
a8ab0d
all:		package-shared package-static app
f46039
54c1e4
install:	package-install-app
54c1e4
install:	package-install-extras
a8ab0d
install:	install-libs
f46039
54c1e4
app:		app-tag
c26f15
5d8ea8
app.tag:
c26f15
		cp $(PACKAGE_APP) $(APP)
c26f15
		touch app.tag
f46039
a8ab0d
install-libs:	package-install-shared
a8ab0d
install-libs:	package-install-static
f46039
8dc59e
install-headers-default:
d4de33
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
d4de33
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
f46039
832c05
install-shared:	shared install-lib install-implib
832c05
install-shared: package-install-soname package-install-solink
1bf01c
install-shared: install-headers
225022
225022
install-lib:	shared
d4de33
		mkdir -p $(DESTDIR)$(LIBDIR)
d4de33
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
f46039
1bf01c
install-static:	static install-headers
d4de33
		mkdir -p $(DESTDIR)$(LIBDIR)
d4de33
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
f46039
bdd4bb
install-app:	app install-app-extras
d4de33
		mkdir -p $(DESTDIR)$(BINDIR)
d4de33
		cp $(APP) $(DESTDIR)$(BINDIR)
f46039
34b9c7
install-static-app:	static-app install-app-extras
34b9c7
			mkdir -p $(DESTDIR)$(BINDIR)
34b9c7
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
34b9c7
f46039
f46039
832c05
shared:		shared-lib implib
832c05
shared:		package-shared-soname package-shared-solink
f46039
f46039
static:		static-lib
f46039
f46039
shared-lib:	shared-objs $(SHARED_LIB)
f46039
225022
shared-soname:	shared-lib $(SHARED_SONAME)
225022
225022
shared-solink:	shared-lib $(SHARED_SOLINK)
225022
f46039
static-lib:	static-objs $(STATIC_LIB)
f46039
f46039
f46039
c26f15
default-app:	version.tag static-objs $(DEFAULT_APP)
f46039
f46039
shared-app:	version.tag shared $(SHARED_APP)
f46039
c26f15
static-app:	version.tag static-objs $(STATIC_APP)
f46039
f46039
f46039
f46039
shared-objs:	dirs $(SHARED_OBJS)
f46039
f46039
static-objs:	dirs $(STATIC_OBJS)
f46039
f46039
app-objs:	dirs $(APP_OBJS)
f46039
f46039
f46039
f46039
$(SHARED_LIB):	$(SHARED_OBJS)
f46039
f46039
$(STATIC_LIB):	$(STATIC_OBJS)
f46039
c26f15
$(APP):		$(PACKAGE_APP)
f46039
f46039
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
c26f15
		rm -f app.tag
f46039
		$(CC) -o $@ $^ $(LDFLAGS_APP)
f46039
f46039
$(SHARED_APP):	$(SHARED_LIB) $(APP_OBJS)
c26f15
		rm -f app.tag
21f1d1
		$(CC) -o $@ $(APP_OBJS) -l$(PACKAGE) $(LDFLAGS_SHARED)
f46039
f46039
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
c26f15
		rm -f app.tag
d54f9b
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
f46039
f46039
3e9a60
dirs: 		dirs.tag
f46039
f46039
dirs.tag:
1b0fc6
		mkdir -p bin
1b0fc6
		mkdir -p lib
f46039
		touch dirs.tag
f46039
f46039
host.tag:	Makefile
f46039
		$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
f46039
		touch host.tag
f46039
269f6f
version.tag:	$(GIT_REFERENCE_INDEX)
f46039
		$(PROJECT_DIR)/sysinfo/version.sh	\
11deae
			-s $(SOURCE_DIR)		\
f46039
			-o build/$(PACKAGE)_version.h	\
f46039
			-p $(PACKAGE)
f46039
		touch version.tag
f46039
f46039
distclean:	clean
f46039
		rm -f Makefile
f46039
b2d0f4
clean:		clean-implib
f46039
		rm -f tree.tag
f46039
		rm -f dirs.tag
f46039
		rm -f host.tag
f46039
		rm -f version.tag
d87d1a
		rm -f app.tag
f46039
		rm -f $(SHARED_OBJS)
f46039
		rm -f $(STATIC_OBJS)
f46039
		rm -f $(APP_OBJS)
f46039
		rm -f $(SHARED_LIB)
225022
		rm -f $(SHARED_SONAME)
225022
		rm -f $(SHARED_SOLINK)
f46039
		rm -f $(STATIC_LIB)
f46039
		rm -f $(APP)
f46039
		rm -f $(DEFAULT_APP)
f46039
		rm -f $(SHARED_APP)
f46039
		rm -f $(STATIC_APP)
f46039
f46039
40b609
.display:	.display-project .display-env .display-tools .display-flags \
a8ab0d
		.display-pe .display-elf .display-dirs .display-build \
a8ab0d
		.display-config
f46039
0bf5e7
.conf:		PAGER ?= less
0bf5e7
.conf:
0bf5e7
		$(MAKE) .display | $(PAGER)
0bf5e7
40b609
.display-project:
75fc18
		@echo PACKAGE:'                '$(PACKAGE)
75fc18
		@echo NICKNAME:'               '$(NICKNAME)
40b609
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
40b609
		@echo BUILD_DIR:'              '$(CURDIR)
40b609
		@echo
40b609
f46039
.display-env:
f46039
		@echo BUILD:'                  '$(BUILD)
f46039
		@echo HOST:'                   '$(HOST)
f46039
		@echo TARGET:'                 '$(TARGET)
f46039
		@echo ARCH:'                   '$(ARCH)
e83fbe
		@echo COMPILER:'               '$(COMPILER)
46d732
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
f46039
		@echo SYSROOT:'                '$(SYSROOT)
239036
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
f46039
		@echo SHELL:'                  '$(SHELL)
f46039
		@echo
f46039
f46039
.display-tools:
f46039
		@echo CC:'                     '$(CC)
f46039
		@echo CPP:'                    '$(CPP)
f46039
		@echo CXX:'                    '$(CXX)
f46039
		@echo
f46039
		@echo AS:'                     '$(AS)
f46039
		@echo AR:'                     '$(AR)
f46039
		@echo LD:'                     '$(LD)
f46039
		@echo NM:'                     '$(NM)
f46039
		@echo OBJDUMP:'                '$(OBJDUMP)
f46039
		@echo RANLIB:'                 '$(RANLIB)
f46039
		@echo SIZE:'                   '$(SIZE)
f46039
		@echo STRIP:'                  '$(STRIP)
f46039
		@echo STRINGS:'                '$(STRINGS)
f46039
		@echo
f46039
		@echo ADDR2LINE:'              '$(ADDR2LINE)
f46039
		@echo COV:'                    '$(COV)
f46039
		@echo CXXFILT'                 '$(CXXFILT)
f46039
		@echo ELFEDIT:'                '$(ELFEDIT)
f46039
		@echo OBJCOPY:'                '$(OBJCOPY)
f46039
		@echo READELF:'                '$(READELF)
f46039
		@echo
f46039
f46039
.display-flags:
f46039
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
bbe942
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
225022
		@echo CFLAGS_VERSION:'         '$(CFLAGS_VERSION)
f46039
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
f46039
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
f46039
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
e6d235
		@echo CFLAGS_OS:'              '$(CFLAGS_OS)
e6d235
		@echo CFLAGS_SITE:'            '$(CFLAGS_SITE)
f46039
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
616138
		@echo CFLAGS_STRICT:'          '$(CFLAGS_STRICT)
a5b647
		@echo CFLAGS_UTIL:'            '$(CFLAGS_UTIL)
1ec01b
		@echo CFLAGS_LAST:'            '$(CFLAGS_LAST)
1ec01b
		@echo CFLAGS_ONCE:'            '$(CFLAGS_ONCE)
f46039
		@echo
94b335
		@echo LDFLAGS_COMMON:'         '$(LDFLAGS_COMMON)
94b335
		@echo LDFLAGS_DEBUG:'          '$(LDFLAGS_DEBUG)
94b335
		@echo LDFLAGS_CMDLINE:'        '$(LDFLAGS_CMDLINE)
94b335
		@echo LDFLAGS_CONFIG:'         '$(LDFLAGS_CONFIG)
94b335
		@echo LDFLAGS_SYSROOT:'        '$(LDFLAGS_SYSROOT)
94b335
		@echo LDFLAGS_PATH:'           '$(LDFLAGS_PATH)
616138
		@echo LDFLAGS_STRICT:'         '$(LDFLAGS_STRICT)
94b335
		@echo LDFLAGS_UTIL:'           '$(LDFLAGS_UTIL)
1ec01b
		@echo LDFLAGS_LAST:'           '$(LDFLAGS_LAST)
1ec01b
		@echo LDFLAGS_ONCE:'           '$(LDFLAGS_ONCE)
f46039
		@echo
f46039
f46039
.display-pe:
f46039
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
f46039
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
f46039
		@echo PE_CONFIG_DEFS:'         '$(PE_CONFIG_DEFS)
f46039
		@echo
f46039
f46039
.display-elf:
f46039
		@echo ELF_EH_FRAME:'           '$(ELF_EH_FRAME)
f46039
		@echo ELF_HASH_STYLE:'         '$(ELF_HASH_STYLE)
f46039
		@echo ELF_CONFIG_DEFS:'        '$(ELF_CONFIG_DEFS)
f46039
		@echo
f46039
f46039
.display-dirs:
f46039
		@echo PREFIX:'                 '$(PREFIX)
b6d1b5
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
f46039
		@echo BINDIR:'                 '$(BINDIR)
f46039
		@echo LIBDIR:'                 '$(LIBDIR)
f46039
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
f46039
		@echo MANDIR:'                 '$(MANDIR)
f46039
		@echo DOCDIR:'                 '$(DOCDIR)
f46039
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
f46039
		@echo
f46039
f46039
.display-build:
f46039
		@echo NATIVE_CC:'              '$(NATIVE_CC)
f46039
		@echo NATIVE_OS:'              '$(NATIVE_OS)
f46039
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
f46039
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
f46039
		@echo
f46039
		@echo USER_CC:'                '$(USER_CC)
f46039
		@echo USER_CPP:'               '$(USER_CPP)
f46039
		@echo USER_CXX:'               '$(USER_CXX)
f46039
		@echo
f46039
a8ab0d
.display-config:
a8ab0d
		@echo ALL_SHARED:'             '$(ALL_SHARED)
a8ab0d
		@echo ALL_STATIC:'             '$(ALL_STATIC)
54c1e4
		@echo DISABLE_FRONTEND:'       '$(DISABLE_FRONTEND)
a8ab0d
		@echo DISABLE_SHARED:'         '$(DISABLE_SHARED)
a8ab0d
		@echo DISABLE_STATIC:'         '$(DISABLE_STATIC)
a8ab0d
8b12e5
.display-host:
8b12e5
		@$(CC) $(CFLAGS) -dumpmachine
8b12e5
5651ec
.display-cc:
5651ec
		@echo $(CC)
5651ec
7ec026
.display-cflags:
7ec026
		@echo $(CFLAGS)
7ec026
f46039
0bf5e7
.PHONY:		all install shared static app \
c26f15
		package-app \
b2d0f4
		shared-objs shared-lib \
832c05
		shared-soname shared-solink \
832c05
		package-shared-soname package-shared-solink \
f46039
		static-objs static-lib \
f46039
		default-app shared-app static-app \
b2d0f4
		install-shared install-static \
832c05
		install-soname install-solink \
832c05
		package-install-soname package-install-solink \
f46039
		install-headers install-app \
b9a8a2
		install-headers-default install-headers-custom \
b2d0f4
		clean distclean clean-implib version \
0bf5e7
		.display .conf \
40b609
		.display-project .display-env .display-tools .display-flags \
b2d0f4
		.display-pe .display-elf .display-dirs .display-build \
b2d0f4
		implib implib-ver implib-soname implib-solink \
b2d0f4
		install-implib install-implib-ver \
b2d0f4
		install-implib-soname install-implib-solink