Blame Makefile.in

9ca8c4
PACKAGE 		= @package@
be9551
NICKNAME 		= @nickname@
9ca8c4
PROJECT_DIR 		= @project_dir@
3d89b8
GIT_REFERENCE_DIR	= @git_reference_dir@
9ca8c4
9ca8c4
BUILD 			= @build@
9ca8c4
HOST 			= @host@
9ca8c4
TARGET 			= @target@
9ca8c4
ARCH 			= @arch@
9ca8c4
COMPILER 		= @compiler@
9ca8c4
TOOLCHAIN		= @toolchain@
9ca8c4
SYSROOT 		= @sysroot@
9ca8c4
CROSS_COMPILE 		= @cross_compile@
9ca8c4
SHELL 			= @shell@
9ca8c4
9ca8c4
CFLAGS_COMMON 		= @cflags_common@
a5d144
CFLAGS_DEBUG 		= @cflags_debug@
9ca8c4
CFLAGS_CMDLINE 		= @cflags_cmdline@
9ca8c4
CFLAGS_CONFIG 		= @cflags_config@
9ca8c4
CFLAGS_SYSROOT 		= @cflags_sysroot@
9ca8c4
CFLAGS_OS		= @cflags_os@
9ca8c4
CFLAGS_SITE		= @cflags_site@
9ca8c4
CFLAGS_PATH 		= @cflags_path@
9ca8c4
9ca8c4
LDFLAGS_COMMON 		= @ldflags_common@
a5d144
LDFLAGS_DEBUG 		= @ldflags_debug@
9ca8c4
LDFLAGS_CMDLINE 	= @ldflags_cmdline@
9ca8c4
LDFLAGS_CONFIG 		= @ldflags_config@
9ca8c4
LDFLAGS_SYSROOT 	= @ldflags_sysroot@
9ca8c4
LDFLAGS_PATH 		= @ldflags_path@
9ca8c4
9ca8c4
PE_SUBSYSTEM 		= @pe_subsystem@
9ca8c4
PE_IMAGE_BASE 		= @pe_image_base@
9ca8c4
PE_CONFIG_DEFS  	= @pe_config_defs@
9ca8c4
9ca8c4
ELF_EH_FRAME 		= @elf_eh_frame@
9ca8c4
ELF_HASH_STYLE 		= @elf_hash_style@
9ca8c4
ELF_CONFIG_DEFS 	= @elf_config_defs@
9ca8c4
9ca8c4
PREFIX 			= @prefix@
4a022e
EXEC_PREFIX 		= @exec_prefix@
9ca8c4
BINDIR 			= @bindir@
9ca8c4
LIBDIR 			= @libdir@
9ca8c4
INCLUDEDIR 		= @includedir@
9ca8c4
MANDIR 			= @mandir@
9ca8c4
DOCDIR 			= @docdir@
9ca8c4
LIBEXECDIR 		= @libexecdir@
9ca8c4
9ca8c4
NATIVE_CC 		= @native_cc@
9ca8c4
NATIVE_OS 		= @native_os@
9ca8c4
NATIVE_OS_BITS 		= @native_os_bits@
9ca8c4
NATIVE_OS_UNDERSCORE	= @native_os_underscore@
9ca8c4
9ca8c4
USER_CC                 = @user_cc@
9ca8c4
USER_CPP                = @user_cpp@
9ca8c4
USER_CXX                = @user_cxx@
9ca8c4
9ca8c4
9ca8c4
all:
9ca8c4
install:
9ca8c4
shared:
9ca8c4
static:
9ca8c4
028ddb
install-extras:
028ddb
install-app-extras:
028ddb
install-libs-extras:
9ca8c4
9ca8c4
include $(PROJECT_DIR)/sysinfo/host/$(HOST).mk
9ca8c4
include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk
9ca8c4
include $(PROJECT_DIR)/sysinfo/toolchain/$(TOOLCHAIN).mk
9ca8c4
9ca8c4
include $(PROJECT_DIR)/project/defs.mk
513c5c
include $(PROJECT_DIR)/project/version.mk
1f5b18
include $(PROJECT_DIR)/project/custom.mk
1f5b18
9ca8c4
include $(PROJECT_DIR)/project/tree.mk
9ca8c4
include $(PROJECT_DIR)/project/depends.mk
9ca8c4
include $(PROJECT_DIR)/project/headers.mk
9ca8c4
include $(PROJECT_DIR)/project/common.mk
9ca8c4
include $(PROJECT_DIR)/project/arch.mk
9ca8c4
include $(PROJECT_DIR)/project/extras.mk
9ca8c4
include $(PROJECT_DIR)/project/overrides.mk
9ca8c4
9ca8c4
9ca8c4
9ca8c4
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
9ca8c4
9f24d2
src/%.lo: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag dirs.tag version.tag
9ca8c4
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
9ca8c4
9f24d2
src/%.o: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag dirs.tag version.tag
9ca8c4
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
9ca8c4
513c5c
lib/%$(OS_LIB_SUFFIX)$(VER_XYZ):
9ca8c4
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
9ca8c4
83ef8c
lib/%$(OS_ARCHIVE_EXT):
9ca8c4
		rm -f $@
9ca8c4
		$(AR) rcs $@ $^
9ca8c4
9ca8c4
9ca8c4
9ca8c4
all:		shared static app
9ca8c4
028ddb
install:	install-libs install-headers install-app install-extras
9ca8c4
9ca8c4
app:		default-app
9ca8c4
9ca8c4
513c5c
install-libs:	install-shared install-static install-libs-extras
9ca8c4
9ca8c4
install-headers:shared static
2b6981
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
2b6981
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
9ca8c4
1f5b18
install-shared:	shared install-lib install-soname install-solink install-implib
513c5c
513c5c
install-lib:	shared
2b6981
		mkdir -p $(DESTDIR)$(LIBDIR)
2b6981
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
9ca8c4
9ca8c4
install-static:	static
2b6981
		mkdir -p $(DESTDIR)$(LIBDIR)
2b6981
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
9ca8c4
028ddb
install-app:	app install-app-extras
2b6981
		mkdir -p $(DESTDIR)$(BINDIR)
2b6981
		cp $(APP) $(DESTDIR)$(BINDIR)
9ca8c4
9ca8c4
9ca8c4
1f5b18
shared:		shared-lib shared-soname shared-solink implib
9ca8c4
9ca8c4
static:		static-lib
9ca8c4
9ca8c4
shared-lib:	shared-objs $(SHARED_LIB)
9ca8c4
513c5c
shared-soname:	shared-lib $(SHARED_SONAME)
513c5c
513c5c
shared-solink:	shared-lib $(SHARED_SOLINK)
513c5c
9ca8c4
static-lib:	static-objs $(STATIC_LIB)
9ca8c4
9ca8c4
9ca8c4
9ca8c4
default-app:	version.tag static $(DEFAULT_APP) $(APP)
9ca8c4
9ca8c4
shared-app:	version.tag shared $(SHARED_APP)
9ca8c4
9ca8c4
static-app:	version.tag static $(STATIC_APP)
9ca8c4
9ca8c4
9ca8c4
9ca8c4
shared-objs:	dirs $(SHARED_OBJS)
9ca8c4
9ca8c4
static-objs:	dirs $(STATIC_OBJS)
9ca8c4
9ca8c4
app-objs:	dirs $(APP_OBJS)
9ca8c4
9ca8c4
9ca8c4
9ca8c4
$(SHARED_LIB):	$(SHARED_OBJS)
9ca8c4
9ca8c4
$(STATIC_LIB):	$(STATIC_OBJS)
9ca8c4
9ca8c4
$(APP):		$(DEFAULT_APP)
9ca8c4
		cp $^ $@
9ca8c4
9ca8c4
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
9ca8c4
		$(CC) -o $@ $^ $(LDFLAGS_APP)
9ca8c4
9ca8c4
$(SHARED_APP):	$(SHARED_LIB) $(APP_OBJS)
9ca8c4
		$(CC) -o $@ $(APP_OBJS) -l$(PACKAGE) $(LDFLAGS_SHARED)
9ca8c4
9ca8c4
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
9ca8c4
		$(CC) -static -o $@ $^ -l$(PACKAGE) $(LDFLAGS_STATIC)
9ca8c4
9ca8c4
9ca8c4
dirs: 		dirs.tag tree.tag
9ca8c4
9ca8c4
dirs.tag:
83ef8c
		mkdir -p bin
83ef8c
		mkdir -p lib
9ca8c4
		touch dirs.tag
9ca8c4
9ca8c4
host.tag:	Makefile
9ca8c4
		$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
9ca8c4
		touch host.tag
9ca8c4
3d89b8
version.tag:	$(GIT_REFERENCE_DIR)
9ca8c4
		$(PROJECT_DIR)/sysinfo/version.sh	\
9ca8c4
			-s $(PROJECT_DIR)		\
9ca8c4
			-o build/$(PACKAGE)_version.h	\
9ca8c4
			-p $(PACKAGE)
9ca8c4
		touch version.tag
9ca8c4
9ca8c4
distclean:	clean
9ca8c4
		rm -f Makefile
9ca8c4
1f5b18
clean:		clean-implib
9ca8c4
		rm -f tree.tag
9ca8c4
		rm -f dirs.tag
9ca8c4
		rm -f host.tag
9ca8c4
		rm -f version.tag
9ca8c4
		rm -f $(SHARED_OBJS)
9ca8c4
		rm -f $(STATIC_OBJS)
9ca8c4
		rm -f $(APP_OBJS)
9ca8c4
		rm -f $(SHARED_LIB)
513c5c
		rm -f $(SHARED_SONAME)
513c5c
		rm -f $(SHARED_SOLINK)
9ca8c4
		rm -f $(STATIC_LIB)
9ca8c4
		rm -f $(APP)
9ca8c4
		rm -f $(DEFAULT_APP)
9ca8c4
		rm -f $(SHARED_APP)
9ca8c4
		rm -f $(STATIC_APP)
9ca8c4
9ca8c4
9ca8c4
.display:	.display-project .display-env .display-tools .display-flags \
9ca8c4
		.display-pe .display-elf .display-dirs .display-build
9ca8c4
9ca8c4
.display-project:
79b402
		@echo PACKAGE:'                '$(PACKAGE)
79b402
		@echo NICKNAME:'               '$(NICKNAME)
9ca8c4
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
9ca8c4
		@echo BUILD_DIR:'              '$(CURDIR)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-env:
9ca8c4
		@echo BUILD:'                  '$(BUILD)
9ca8c4
		@echo HOST:'                   '$(HOST)
9ca8c4
		@echo TARGET:'                 '$(TARGET)
9ca8c4
		@echo ARCH:'                   '$(ARCH)
9ca8c4
		@echo COMPILER:'               '$(COMPILER)
9ca8c4
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
9ca8c4
		@echo SYSROOT:'                '$(SYSROOT)
9ca8c4
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
9ca8c4
		@echo SHELL:'                  '$(SHELL)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-tools:
9ca8c4
		@echo CC:'                     '$(CC)
9ca8c4
		@echo CPP:'                    '$(CPP)
9ca8c4
		@echo CXX:'                    '$(CXX)
9ca8c4
		@echo
9ca8c4
		@echo AS:'                     '$(AS)
9ca8c4
		@echo AR:'                     '$(AR)
9ca8c4
		@echo LD:'                     '$(LD)
9ca8c4
		@echo NM:'                     '$(NM)
9ca8c4
		@echo OBJDUMP:'                '$(OBJDUMP)
9ca8c4
		@echo RANLIB:'                 '$(RANLIB)
9ca8c4
		@echo SIZE:'                   '$(SIZE)
9ca8c4
		@echo STRIP:'                  '$(STRIP)
9ca8c4
		@echo STRINGS:'                '$(STRINGS)
9ca8c4
		@echo
9ca8c4
		@echo ADDR2LINE:'              '$(ADDR2LINE)
9ca8c4
		@echo COV:'                    '$(COV)
9ca8c4
		@echo CXXFILT'                 '$(CXXFILT)
9ca8c4
		@echo ELFEDIT:'                '$(ELFEDIT)
9ca8c4
		@echo OBJCOPY:'                '$(OBJCOPY)
9ca8c4
		@echo READELF:'                '$(READELF)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-flags:
9ca8c4
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
a5d144
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
513c5c
		@echo CFLAGS_VERSION:'         '$(CFLAGS_VERSION)
9ca8c4
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
9ca8c4
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
9ca8c4
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
9ca8c4
		@echo CFLAGS_OS:'              '$(CFLAGS_OS)
9ca8c4
		@echo CFLAGS_SITE:'            '$(CFLAGS_SITE)
9ca8c4
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
9ca8c4
		@echo
9ca8c4
		@echo LDFLAGS_COMMON:'          '$(LDFLAGS_COMMON)
a5d144
		@echo LDFLAGS_DEBUG:'           '$(LDFLAGS_DEBUG)
9ca8c4
		@echo LDFLAGS_CMDLINE:'         '$(LDFLAGS_CMDLINE)
9ca8c4
		@echo LDFLAGS_CONFIG:'          '$(LDFLAGS_CONFIG)
9ca8c4
		@echo LDFLAGS_SYSROOT:'         '$(LDFLAGS_SYSROOT)
9ca8c4
		@echo LDFLAGS_PATH:'            '$(LDFLAGS_PATH)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-pe:
9ca8c4
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
9ca8c4
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
9ca8c4
		@echo PE_CONFIG_DEFS:'         '$(PE_CONFIG_DEFS)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-elf:
9ca8c4
		@echo ELF_EH_FRAME:'           '$(ELF_EH_FRAME)
9ca8c4
		@echo ELF_HASH_STYLE:'         '$(ELF_HASH_STYLE)
9ca8c4
		@echo ELF_CONFIG_DEFS:'        '$(ELF_CONFIG_DEFS)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-dirs:
9ca8c4
		@echo PREFIX:'                 '$(PREFIX)
4a022e
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
9ca8c4
		@echo BINDIR:'                 '$(BINDIR)
9ca8c4
		@echo LIBDIR:'                 '$(LIBDIR)
9ca8c4
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
9ca8c4
		@echo MANDIR:'                 '$(MANDIR)
9ca8c4
		@echo DOCDIR:'                 '$(DOCDIR)
9ca8c4
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-build:
9ca8c4
		@echo NATIVE_CC:'              '$(NATIVE_CC)
9ca8c4
		@echo NATIVE_OS:'              '$(NATIVE_OS)
9ca8c4
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
9ca8c4
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
9ca8c4
		@echo
9ca8c4
		@echo USER_CC:'                '$(USER_CC)
9ca8c4
		@echo USER_CPP:'               '$(USER_CPP)
9ca8c4
		@echo USER_CXX:'               '$(USER_CXX)
9ca8c4
		@echo
9ca8c4
e43b24
.display-host:
e43b24
		@$(CC) $(CFLAGS) -dumpmachine
e43b24
9ca8c4
9ca8c4
.PHONY:		all install shared static app .display \
1f5b18
		shared-objs shared-lib \
9ca8c4
		static-objs static-lib \
9ca8c4
		default-app shared-app static-app \
1f5b18
		install-shared install-static \
9ca8c4
		install-headers install-app \
1f5b18
		clean distclean clean-implib version \
9ca8c4
		.display-project .display-env .display-tools .display-flags \
1f5b18
		.display-pe .display-elf .display-dirs .display-build \
1f5b18
		implib implib-ver implib-soname implib-solink \
1f5b18
		install-implib install-implib-ver \
1f5b18
		install-implib-soname install-implib-solink