Blame Makefile.in

11ab44
PACKAGE 		= @package@
9c6a0f
NICKNAME 		= @nickname@
11ab44
PROJECT_DIR 		= @project_dir@
ed1185
GIT_REFERENCE_DIR	= @git_reference_dir@
0804e2
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
11ab44
11ab44
BUILD 			= @build@
11ab44
HOST 			= @host@
11ab44
TARGET 			= @target@
11ab44
ARCH 			= @arch@
aee992
COMPILER 		= @compiler@
e5d4bb
TOOLCHAIN		= @toolchain@
11ab44
SYSROOT 		= @sysroot@
11ab44
CROSS_COMPILE 		= @cross_compile@
11ab44
SHELL 			= @shell@
11ab44
11ab44
CFLAGS_COMMON 		= @cflags_common@
03598c
CFLAGS_DEBUG 		= @cflags_debug@
11ab44
CFLAGS_CMDLINE 		= @cflags_cmdline@
11ab44
CFLAGS_CONFIG 		= @cflags_config@
11ab44
CFLAGS_SYSROOT 		= @cflags_sysroot@
596f2f
CFLAGS_OS		= @cflags_os@
596f2f
CFLAGS_SITE		= @cflags_site@
11ab44
CFLAGS_PATH 		= @cflags_path@
598fb4
CFLAGS_STRICT 		= @cflags_strict@
54173a
CFLAGS_UTIL 		= @cflags_util@
11ab44
11ab44
LDFLAGS_COMMON 		= @ldflags_common@
03598c
LDFLAGS_DEBUG 		= @ldflags_debug@
11ab44
LDFLAGS_CMDLINE 	= @ldflags_cmdline@
11ab44
LDFLAGS_CONFIG 		= @ldflags_config@
11ab44
LDFLAGS_SYSROOT 	= @ldflags_sysroot@
11ab44
LDFLAGS_PATH 		= @ldflags_path@
598fb4
LDFLAGS_STRICT 		= @ldflags_strict@
54173a
LDFLAGS_UTIL 		= @ldflags_util@
11ab44
11ab44
PE_SUBSYSTEM 		= @pe_subsystem@
11ab44
PE_IMAGE_BASE 		= @pe_image_base@
11ab44
PE_CONFIG_DEFS  	= @pe_config_defs@
11ab44
11ab44
ELF_EH_FRAME 		= @elf_eh_frame@
11ab44
ELF_HASH_STYLE 		= @elf_hash_style@
11ab44
ELF_CONFIG_DEFS 	= @elf_config_defs@
11ab44
11ab44
PREFIX 			= @prefix@
58536c
EXEC_PREFIX 		= @exec_prefix@
b023b2
BINDIR 			= @bindir@
b023b2
LIBDIR 			= @libdir@
b023b2
INCLUDEDIR 		= @includedir@
b023b2
MANDIR 			= @mandir@
b023b2
DOCDIR 			= @docdir@
b023b2
LIBEXECDIR 		= @libexecdir@
11ab44
1857dc
NATIVE_CC 		= @native_cc@
1857dc
NATIVE_OS 		= @native_os@
1857dc
NATIVE_OS_BITS 		= @native_os_bits@
1857dc
NATIVE_OS_UNDERSCORE	= @native_os_underscore@
d40d13
7f572b
USER_CC                 = @user_cc@
7f572b
USER_CPP                = @user_cpp@
7f572b
USER_CXX                = @user_cxx@
d40d13
5b28e8
ALL_SHARED              = @all_shared@
5b28e8
ALL_STATIC              = @all_static@
a403fe
DISABLE_FRONTEND	= @disable_frontend@
5b28e8
DISABLE_SHARED          = @disable_shared@
5b28e8
DISABLE_STATIC          = @disable_static@
d40d13
d40d13
all:
d40d13
install:
d40d13
shared:
d40d13
static:
d40d13
58ae29
install-extras:
58ae29
install-app-extras:
d40d13
d40d13
include $(PROJECT_DIR)/sysinfo/host/$(HOST).mk
aee992
include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk
e5d4bb
include $(PROJECT_DIR)/sysinfo/toolchain/$(TOOLCHAIN).mk
d40d13
d40d13
include $(PROJECT_DIR)/project/defs.mk
cc1c9b
include $(PROJECT_DIR)/project/version.mk
781ac1
include $(PROJECT_DIR)/project/custom.mk
781ac1
d40d13
include $(PROJECT_DIR)/project/tree.mk
d40d13
include $(PROJECT_DIR)/project/depends.mk
d40d13
include $(PROJECT_DIR)/project/headers.mk
d40d13
include $(PROJECT_DIR)/project/common.mk
d40d13
include $(PROJECT_DIR)/project/arch.mk
d40d13
include $(PROJECT_DIR)/project/extras.mk
d40d13
include $(PROJECT_DIR)/project/overrides.mk
d40d13
d40d13
d40d13
d40d13
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
d40d13
4bf599
src/%.lo: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag version.tag
d40d13
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
d40d13
4bf599
src/%.o: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag version.tag
d40d13
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
d40d13
cc1c9b
lib/%$(OS_LIB_SUFFIX)$(VER_XYZ):
d40d13
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
d40d13
7cf9c8
lib/%$(OS_ARCHIVE_EXT):
d40d13
		rm -f $@
8f7725
		$(AR) rcs $@ $^
d40d13
d40d13
d40d13
5b28e8
all:		package-shared package-static app
d40d13
a403fe
install:	package-install-app
a403fe
install:	package-install-extras
5b28e8
install:	install-libs
d40d13
a403fe
app:		app-tag
53f310
3efbc1
app.tag:
53f310
		cp $(PACKAGE_APP) $(APP)
53f310
		touch app.tag
d40d13
5b28e8
install-libs:	package-install-shared
5b28e8
install-libs:	package-install-static
d40d13
0804e2
install-headers-default:
9d2880
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
9d2880
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
d40d13
781ac1
install-shared:	shared install-lib install-soname install-solink install-implib
0eaaff
install-shared: install-headers
cc1c9b
cc1c9b
install-lib:	shared
9d2880
		mkdir -p $(DESTDIR)$(LIBDIR)
9d2880
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
d40d13
0eaaff
install-static:	static install-headers
9d2880
		mkdir -p $(DESTDIR)$(LIBDIR)
9d2880
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
d40d13
58ae29
install-app:	app install-app-extras
9d2880
		mkdir -p $(DESTDIR)$(BINDIR)
9d2880
		cp $(APP) $(DESTDIR)$(BINDIR)
d40d13
d4993e
install-static-app:	static-app install-app-extras
d4993e
			mkdir -p $(DESTDIR)$(BINDIR)
d4993e
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
d4993e
d40d13
d40d13
781ac1
shared:		shared-lib shared-soname shared-solink implib
d40d13
d40d13
static:		static-lib
d40d13
d40d13
shared-lib:	shared-objs $(SHARED_LIB)
d40d13
cc1c9b
shared-soname:	shared-lib $(SHARED_SONAME)
cc1c9b
cc1c9b
shared-solink:	shared-lib $(SHARED_SOLINK)
cc1c9b
d40d13
static-lib:	static-objs $(STATIC_LIB)
d40d13
d40d13
d40d13
53f310
default-app:	version.tag static-objs $(DEFAULT_APP)
d40d13
4ab720
shared-app:	version.tag shared $(SHARED_APP)
d40d13
53f310
static-app:	version.tag static-objs $(STATIC_APP)
d40d13
d40d13
d40d13
d40d13
shared-objs:	dirs $(SHARED_OBJS)
d40d13
d40d13
static-objs:	dirs $(STATIC_OBJS)
d40d13
d40d13
app-objs:	dirs $(APP_OBJS)
d40d13
d40d13
d40d13
d40d13
$(SHARED_LIB):	$(SHARED_OBJS)
d40d13
d40d13
$(STATIC_LIB):	$(STATIC_OBJS)
d40d13
53f310
$(APP):		$(PACKAGE_APP)
d40d13
d40d13
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
53f310
		rm -f app.tag
d40d13
		$(CC) -o $@ $^ $(LDFLAGS_APP)
d40d13
d40d13
$(SHARED_APP):	$(SHARED_LIB) $(APP_OBJS)
53f310
		rm -f app.tag
f9baff
		$(CC) -o $@ $(APP_OBJS) -l$(PACKAGE) $(LDFLAGS_SHARED)
d40d13
d40d13
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
53f310
		rm -f app.tag
d40d13
		$(CC) -static -o $@ $^ -l$(PACKAGE) $(LDFLAGS_STATIC)
d40d13
d40d13
4bf599
dirs: 		dirs.tag
d40d13
d40d13
dirs.tag:
7cf9c8
		mkdir -p bin
7cf9c8
		mkdir -p lib
d40d13
		touch dirs.tag
d40d13
bd5bd5
host.tag:	Makefile
26e820
		$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
bd5bd5
		touch host.tag
bd5bd5
ed1185
version.tag:	$(GIT_REFERENCE_DIR)
4ab720
		$(PROJECT_DIR)/sysinfo/version.sh	\
4ab720
			-s $(PROJECT_DIR)		\
4ab720
			-o build/$(PACKAGE)_version.h	\
4ab720
			-p $(PACKAGE)
4ab720
		touch version.tag
4ab720
d40d13
distclean:	clean
d40d13
		rm -f Makefile
d40d13
781ac1
clean:		clean-implib
d40d13
		rm -f tree.tag
d40d13
		rm -f dirs.tag
bd5bd5
		rm -f host.tag
4ab720
		rm -f version.tag
45bb87
		rm -f app.tag
d40d13
		rm -f $(SHARED_OBJS)
d40d13
		rm -f $(STATIC_OBJS)
d40d13
		rm -f $(APP_OBJS)
d40d13
		rm -f $(SHARED_LIB)
cc1c9b
		rm -f $(SHARED_SONAME)
cc1c9b
		rm -f $(SHARED_SOLINK)
d40d13
		rm -f $(STATIC_LIB)
d40d13
		rm -f $(APP)
d40d13
		rm -f $(DEFAULT_APP)
d40d13
		rm -f $(SHARED_APP)
d40d13
		rm -f $(STATIC_APP)
d40d13
d40d13
ff1fbf
.display:	.display-project .display-env .display-tools .display-flags \
5b28e8
		.display-pe .display-elf .display-dirs .display-build \
5b28e8
		.display-config
bf7b91
18a883
.conf:		PAGER ?= less
18a883
.conf:
18a883
		$(MAKE) .display | $(PAGER)
18a883
ff1fbf
.display-project:
2ba44f
		@echo PACKAGE:'                '$(PACKAGE)
2ba44f
		@echo NICKNAME:'               '$(NICKNAME)
ff1fbf
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
ff1fbf
		@echo BUILD_DIR:'              '$(CURDIR)
ff1fbf
		@echo
ff1fbf
bf7b91
.display-env:
bf7b91
		@echo BUILD:'                  '$(BUILD)
bf7b91
		@echo HOST:'                   '$(HOST)
bf7b91
		@echo TARGET:'                 '$(TARGET)
bf7b91
		@echo ARCH:'                   '$(ARCH)
aee992
		@echo COMPILER:'               '$(COMPILER)
e5d4bb
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
bf7b91
		@echo SYSROOT:'                '$(SYSROOT)
ade5d0
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
bf7b91
		@echo SHELL:'                  '$(SHELL)
886e64
		@echo
bf7b91
bf7b91
.display-tools:
bf7b91
		@echo CC:'                     '$(CC)
bf7b91
		@echo CPP:'                    '$(CPP)
bf7b91
		@echo CXX:'                    '$(CXX)
bf7b91
		@echo
bf7b91
		@echo AS:'                     '$(AS)
bf7b91
		@echo AR:'                     '$(AR)
bf7b91
		@echo LD:'                     '$(LD)
bf7b91
		@echo NM:'                     '$(NM)
bf7b91
		@echo OBJDUMP:'                '$(OBJDUMP)
bf7b91
		@echo RANLIB:'                 '$(RANLIB)
bf7b91
		@echo SIZE:'                   '$(SIZE)
bf7b91
		@echo STRIP:'                  '$(STRIP)
bf7b91
		@echo STRINGS:'                '$(STRINGS)
bf7b91
		@echo
bf7b91
		@echo ADDR2LINE:'              '$(ADDR2LINE)
bf7b91
		@echo COV:'                    '$(COV)
bf7b91
		@echo CXXFILT'                 '$(CXXFILT)
bf7b91
		@echo ELFEDIT:'                '$(ELFEDIT)
bf7b91
		@echo OBJCOPY:'                '$(OBJCOPY)
bf7b91
		@echo READELF:'                '$(READELF)
bf7b91
		@echo
bf7b91
bf7b91
.display-flags:
bf7b91
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
03598c
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
cc1c9b
		@echo CFLAGS_VERSION:'         '$(CFLAGS_VERSION)
bf7b91
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
bf7b91
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
bf7b91
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
596f2f
		@echo CFLAGS_OS:'              '$(CFLAGS_OS)
596f2f
		@echo CFLAGS_SITE:'            '$(CFLAGS_SITE)
bf7b91
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
598fb4
		@echo CFLAGS_STRICT:'          '$(CFLAGS_STRICT)
54173a
		@echo CFLAGS_UTIL:'            '$(CFLAGS_UTIL)
bf7b91
		@echo
0350a9
		@echo LDFLAGS_COMMON:'         '$(LDFLAGS_COMMON)
0350a9
		@echo LDFLAGS_DEBUG:'          '$(LDFLAGS_DEBUG)
0350a9
		@echo LDFLAGS_CMDLINE:'        '$(LDFLAGS_CMDLINE)
0350a9
		@echo LDFLAGS_CONFIG:'         '$(LDFLAGS_CONFIG)
0350a9
		@echo LDFLAGS_SYSROOT:'        '$(LDFLAGS_SYSROOT)
0350a9
		@echo LDFLAGS_PATH:'           '$(LDFLAGS_PATH)
598fb4
		@echo LDFLAGS_STRICT:'         '$(LDFLAGS_STRICT)
0350a9
		@echo LDFLAGS_UTIL:'           '$(LDFLAGS_UTIL)
bf7b91
		@echo
bf7b91
bf7b91
.display-pe:
bf7b91
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
bf7b91
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
bf7b91
		@echo PE_CONFIG_DEFS:'         '$(PE_CONFIG_DEFS)
bf7b91
		@echo
bf7b91
bf7b91
.display-elf:
bf7b91
		@echo ELF_EH_FRAME:'           '$(ELF_EH_FRAME)
bf7b91
		@echo ELF_HASH_STYLE:'         '$(ELF_HASH_STYLE)
bf7b91
		@echo ELF_CONFIG_DEFS:'        '$(ELF_CONFIG_DEFS)
bf7b91
		@echo
bf7b91
bf7b91
.display-dirs:
bf7b91
		@echo PREFIX:'                 '$(PREFIX)
58536c
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
b023b2
		@echo BINDIR:'                 '$(BINDIR)
b023b2
		@echo LIBDIR:'                 '$(LIBDIR)
b023b2
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
b023b2
		@echo MANDIR:'                 '$(MANDIR)
b023b2
		@echo DOCDIR:'                 '$(DOCDIR)
b023b2
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
bf7b91
		@echo
bf7b91
bf7b91
.display-build:
1857dc
		@echo NATIVE_CC:'              '$(NATIVE_CC)
1857dc
		@echo NATIVE_OS:'              '$(NATIVE_OS)
1857dc
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
3d3888
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
bf7b91
		@echo
7f572b
		@echo USER_CC:'                '$(USER_CC)
7f572b
		@echo USER_CPP:'               '$(USER_CPP)
7f572b
		@echo USER_CXX:'               '$(USER_CXX)
7f572b
		@echo
d40d13
5b28e8
.display-config:
5b28e8
		@echo ALL_SHARED:'             '$(ALL_SHARED)
5b28e8
		@echo ALL_STATIC:'             '$(ALL_STATIC)
a403fe
		@echo DISABLE_FRONTEND:'       '$(DISABLE_FRONTEND)
5b28e8
		@echo DISABLE_SHARED:'         '$(DISABLE_SHARED)
5b28e8
		@echo DISABLE_STATIC:'         '$(DISABLE_STATIC)
5b28e8
0ee66a
.display-host:
0ee66a
		@$(CC) $(CFLAGS) -dumpmachine
0ee66a
09d985
.display-cc:
09d985
		@echo $(CC)
09d985
23bc8e
.display-cflags:
23bc8e
		@echo $(CFLAGS)
23bc8e
d40d13
18a883
.PHONY:		all install shared static app \
53f310
		package-app \
781ac1
		shared-objs shared-lib \
d40d13
		static-objs static-lib \
d40d13
		default-app shared-app static-app \
781ac1
		install-shared install-static \
d40d13
		install-headers install-app \
940999
		install-headers-default install-headers-custom \
781ac1
		clean distclean clean-implib version \
18a883
		.display .conf \
ff1fbf
		.display-project .display-env .display-tools .display-flags \
781ac1
		.display-pe .display-elf .display-dirs .display-build \
781ac1
		implib implib-ver implib-soname implib-solink \
781ac1
		install-implib install-implib-ver \
781ac1
		install-implib-soname install-implib-solink