Blame Makefile.in

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