orbea / zippy / sofort

Forked from zippy/sofort 2 years ago
Clone

Blame Makefile.in

f46039
PACKAGE 		= @package@
78fd02
NICKNAME 		= @nickname@
f46039
PROJECT_DIR 		= @project_dir@
55cd8b
GIT_REFERENCE_DIR	= @git_reference_dir@
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@
a5b647
CFLAGS_UTIL 		= @cflags_util@
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@
a5b647
LDFLAGS_UTIL 		= @ldflags_util@
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@
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
f46039
include $(PROJECT_DIR)/project/defs.mk
225022
include $(PROJECT_DIR)/project/version.mk
b2d0f4
include $(PROJECT_DIR)/project/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
1f115d
src/%.lo: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag dirs.tag version.tag
f46039
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
f46039
1f115d
src/%.o: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag dirs.tag version.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
a8ab0d
install:	install-app
a8ab0d
install:	install-extras
a8ab0d
install:	install-libs
f46039
c26f15
app:		package-app app-tag
f46039
c26f15
app-tag:	package-app app.tag
c26f15
c26f15
app.tag:	package-app
c26f15
		cp $(PACKAGE_APP) $(APP)
c26f15
		touch app.tag
f46039
a8ab0d
install-libs:	package-install-shared
a8ab0d
install-libs:	package-install-static
f46039
a8ab0d
install-headers:package-shared package-static
d4de33
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
d4de33
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
f46039
b2d0f4
install-shared:	shared install-lib install-soname install-solink install-implib
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
b2d0f4
shared:		shared-lib shared-soname shared-solink implib
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
f46039
		$(CC) -static -o $@ $^ -l$(PACKAGE) $(LDFLAGS_STATIC)
f46039
f46039
f46039
dirs: 		dirs.tag tree.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
55cd8b
version.tag:	$(GIT_REFERENCE_DIR)
f46039
		$(PROJECT_DIR)/sysinfo/version.sh	\
f46039
			-s $(PROJECT_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
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
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)
a5b647
		@echo CFLAGS_UTIL:'            '$(CFLAGS_UTIL)
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)
94b335
		@echo LDFLAGS_UTIL:'           '$(LDFLAGS_UTIL)
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)
a8ab0d
		@echo DISABLE_SHARED:'         '$(DISABLE_SHARED)
a8ab0d
		@echo DISABLE_STATIC:'         '$(DISABLE_STATIC)
a8ab0d
8b12e5
.display-host:
8b12e5
		@$(CC) $(CFLAGS) -dumpmachine
8b12e5
f46039
f46039
.PHONY:		all install shared static app .display \
c26f15
		package-app \
b2d0f4
		shared-objs shared-lib \
f46039
		static-objs static-lib \
f46039
		default-app shared-app static-app \
b2d0f4
		install-shared install-static \
f46039
		install-headers install-app \
b2d0f4
		clean distclean clean-implib version \
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