Blame Makefile.in

11ab44
PACKAGE 		= @package@
9c6a0f
NICKNAME 		= @nickname@
11ab44
PROJECT_DIR 		= @project_dir@
694972
SOURCE_DIR 		= @source_dir@
97a8e7
GIT_REFERENCE_INDEX	= @git_reference_index@
0804e2
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
218dfc
AVOID_VERSION		= @avoid_version@
11ab44
f6311b
PKGNAME			= @pkgname@
f6311b
PKGDESC			= @pkgdesc@
f6311b
PKGUSRC			= @pkgusrc@
f6311b
PKGREPO			= @pkgrepo@
f6311b
PKGPSRC			= @pkgpsrc@
f6311b
PKGDURL			= @pkgdurl@
f6311b
PKGDEFS			= @pkgdefs@
f6311b
PKGLIBS			= @pkglibs@
f6311b
11ab44
BUILD 			= @build@
11ab44
HOST 			= @host@
1cc0e3
CCHOST 			= @cchost@
15f27a
CFGHOST 		= @cfghost@
11ab44
TARGET 			= @target@
11ab44
ARCH 			= @arch@
aee992
COMPILER 		= @compiler@
e5d4bb
TOOLCHAIN		= @toolchain@
11ab44
SYSROOT 		= @sysroot@
11ab44
CROSS_COMPILE 		= @cross_compile@
11ab44
SHELL 			= @shell@
11ab44
584311
PREFIX 			= @prefix@
584311
EXEC_PREFIX 		= @exec_prefix@
584311
BINDIR 			= @bindir@
584311
SBINDIR 		= @sbindir@
584311
LIBDIR 			= @libdir@
584311
INCLUDEDIR 		= @includedir@
584311
OLDINCLUDEDIR 		= @oldincludedir@
584311
MANDIR 			= @mandir@
584311
DOCDIR 			= @docdir@
584311
LIBEXECDIR 		= @libexecdir@
584311
584311
SYSCONFDIR		= @sysconfdir@
584311
SHAREDSTATEDIR		= @sharedstatedir@
584311
LOCALSTATEDIR		= @localstatedir@
584311
RUNSTATEDIR		= @runstatedir@
584311
DATAROOTDIR		= @datarootdir@
584311
DATADIR			= @datadir@
584311
INFODIR			= @infodir@
584311
LOCALEDIR		= @localedir@
584311
HTMLDIR			= @htmldir@
584311
DVIDIR			= @dvidir@
584311
PDFDIR			= @pdfdir@
584311
PSDIR			= @psdir@
584311
711507
CFLAGS_COMMON 		+= @cflags_common@
711507
CFLAGS_DEBUG 		+= @cflags_debug@
711507
CFLAGS_CMDLINE 		+= @cflags_cmdline@
711507
CFLAGS_CONFIG 		+= @cflags_config@
711507
CFLAGS_SYSROOT 		+= @cflags_sysroot@
711507
CFLAGS_OS		+= @cflags_os@
711507
CFLAGS_SITE		+= @cflags_site@
711507
CFLAGS_PATH 		+= @cflags_path@
711507
CFLAGS_STRICT 		+= @cflags_strict@
711507
CFLAGS_UTIL 		+= @cflags_util@
711507
CFLAGS_LAST 		+= @cflags_last@
711507
CFLAGS_ONCE 		+= @cflags_once@
711507
711507
LDFLAGS_COMMON 		+= @ldflags_common@
711507
LDFLAGS_DEBUG 		+= @ldflags_debug@
711507
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
711507
LDFLAGS_CONFIG 		+= @ldflags_config@
711507
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
711507
LDFLAGS_PATH 		+= @ldflags_path@
711507
LDFLAGS_STRICT 		+= @ldflags_strict@
711507
LDFLAGS_UTIL 		+= @ldflags_util@
711507
LDFLAGS_LAST 		+= @ldflags_last@
711507
LDFLAGS_ONCE 		+= @ldflags_once@
11ab44
584311
USER_CC                 = @user_cc@
584311
USER_CPP                = @user_cpp@
584311
USER_CXX                = @user_cxx@
584311
711507
NATIVE_HOST		= @native_host@
711507
NATIVE_CFGHOST		= @native_cfghost@
711507
NATIVE_CFLAGS		= @native_cflags@
711507
NATIVE_LDFLAGS		= @native_ldflags@
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
45b33c
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
45b33c
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
45b33c
9f12cb
.SUFFIXES:
9f12cb
d40d13
all:
d40d13
install:
d40d13
shared:
d40d13
static:
d40d13
58ae29
install-extras:
58ae29
install-app-extras:
d40d13
711507
include ./ccenv/host.mk
711507
include ./ccenv/native.mk
d40d13
97304b
include ./cfgdefs.mk
97304b
include ./usrdefs.mk
fa93e5
de823d
include $(PROJECT_DIR)/sofort/core/defs.mk
de823d
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
de823d
include $(PROJECT_DIR)/sofort/core/version.mk
de823d
include $(PROJECT_DIR)/sofort/core/flavor.mk
781ac1
97304b
include $(PROJECT_DIR)/project/osforce.mk
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
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
d40d13
694972
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
d40d13
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
d40d13
694972
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
d40d13
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
d40d13
9eb746
lib/%$(OS_LIB_PREFIXED_SUFFIX)$(VER_XYZ)$(OS_LIB_SUFFIXED_SUFFIX):
d40d13
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
d40d13
e19ef3
lib/%$(OS_ARCHIVE_EXT):
e19ef3
		mkdir -p lib
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
218dfc
install-shared:	shared install-lib install-implib
218dfc
install-shared: package-install-soname package-install-solink
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
218dfc
shared:		shared-lib implib
218dfc
shared:		package-shared-soname package-shared-solink
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)
f82082
$(SHARED_LIB):	LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)
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
019786
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
53f310
		rm -f app.tag
fe9352
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
d40d13
d40d13
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
53f310
		rm -f app.tag
719893
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
d40d13
d40d13
4bf599
dirs: 		dirs.tag
d40d13
d40d13
dirs.tag:
10d3bc
		mkdir -p build
7cf9c8
		mkdir -p bin
7cf9c8
		mkdir -p lib
d40d13
		touch dirs.tag
d40d13
bd5bd5
host.tag:	Makefile
c68106
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
c68106
		mv host.tmp host.tag
8ce85a
10d3bc
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
de823d
		$(PROJECT_DIR)/sofort/tools/version.sh	\
694972
			-s $(SOURCE_DIR)		\
4ab720
			-o build/$(PACKAGE)_version.h	\
4ab720
			-p $(PACKAGE)
4ab720
		touch version.tag
4ab720
d40d13
distclean:	clean
1a04da
		rm -f cfgdefs.mk
1a04da
		rm -f usrdefs.mk
d40d13
		rm -f Makefile
d40d13
781ac1
clean:		clean-implib
d40d13
		rm -f tree.tag
d40d13
		rm -f dirs.tag
bd5bd5
		rm -f host.tag
c68106
		rm -f host.tmp
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)
45f459
		rm -f build/$(PACKAGE)_version.h
45f459
		rm -f build/$(PACKAGE).pc
d40d13
d40d13
ad1be2
.display:	.display-project .display-pkgconf .display-env \
ad1be2
		.display-tools   .display-flags                \
ad1be2
		.display-dirs    .display-build                \
ad1be2
		.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)
f1d272
		@echo SOURCE_DIR:'             '$(SOURCE_DIR)
ff1fbf
		@echo BUILD_DIR:'              '$(CURDIR)
ff1fbf
		@echo
ff1fbf
f6311b
.display-pkgconf:
f6311b
		@echo PKGNAME:'                '$(PKGNAME)
f6311b
		@echo PKGDESC:'                '$(PKGDESC)
f6311b
		@echo PKGUSRC:'                '$(PKGUSRC)
f6311b
		@echo PKGREPO:'                '$(PKGREPO)
f6311b
		@echo PKGPSRC:'                '$(PKGPSRC)
f6311b
		@echo PKGDURL:'                '$(PKGDURL)
f6311b
		@echo PKGDEFS:'                '$(PKGDEFS)
f6311b
		@echo PKGLIBS:'                '$(PKGLIBS)
f6311b
		@echo
f6311b
bf7b91
.display-env:
bf7b91
		@echo BUILD:'                  '$(BUILD)
bf7b91
		@echo HOST:'                   '$(HOST)
1cc0e3
		@echo CCHOST:'                 '$(CCHOST)
15f27a
		@echo CFGHOST:'                '$(CFGHOST)
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)
b35cf1
		@echo CFLAGS_LAST:'            '$(CFLAGS_LAST)
b35cf1
		@echo CFLAGS_ONCE:'            '$(CFLAGS_ONCE)
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)
b35cf1
		@echo LDFLAGS_LAST:'           '$(LDFLAGS_LAST)
b35cf1
		@echo LDFLAGS_ONCE:'           '$(LDFLAGS_ONCE)
bf7b91
		@echo
bf7b91
bf7b91
.display-pe:
bf7b91
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
bf7b91
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
bf7b91
		@echo
bf7b91
bf7b91
.display-dirs:
bf7b91
		@echo PREFIX:'                 '$(PREFIX)
58536c
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
b023b2
		@echo BINDIR:'                 '$(BINDIR)
698a3c
		@echo SBINDIR:'                '$(SBINDIR)
b023b2
		@echo LIBDIR:'                 '$(LIBDIR)
b023b2
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
47362f
		@echo OLDINCLUDEDIR:'          '$(OLDINCLUDEDIR)
b023b2
		@echo MANDIR:'                 '$(MANDIR)
b023b2
		@echo DOCDIR:'                 '$(DOCDIR)
b023b2
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
bf7b91
		@echo
bf7b91
47362f
.display-exdirs:
47362f
		@echo SYSCONFDIR'              '$(SYSCONFDIR)
47362f
		@echo SHAREDSTATEDIR'          '$(SHAREDSTATEDIR)
47362f
		@echo LOCALSTATEDIR'           '$(LOCALSTATEDIR)
47362f
		@echo RUNSTATEDIR'             '$(RUNSTATEDIR)
47362f
		@echo DATAROOTDIR'             '$(DATAROOTDIR)
47362f
		@echo DATADIR'                 '$(DATADIR)
47362f
		@echo INFODIR'                 '$(INFODIR)
47362f
		@echo LOCALEDIR'               '$(LOCALEDIR)
47362f
		@echo HTMLDIR'                 '$(HTMLDIR)
47362f
		@echo DVIDIR'                  '$(DVIDIR)
47362f
		@echo PDFDIR'                  '$(PDFDIR)
47362f
		@echo PSDIR'                   '$(PSDIR)
47362f
bf7b91
.display-build:
1857dc
		@echo NATIVE_CC:'              '$(NATIVE_CC)
711507
		@echo NATIVE_CPP:'             '$(NATIVE_CPP)
711507
		@echo NATIVE_CXX:'             '$(NATIVE_CXX)
711507
711507
		@echo NATIVE_HOST:'            '$(NATIVE_HOST)
711507
		@echo NATIVE_CFGHOST:'         '$(NATIVE_CFGHOST)
711507
		@echo NATIVE_CFLAGS:'          '$(NATIVE_CFLAGS)
711507
		@echo NATIVE_LDFLAGS:'         '$(NATIVE_LDFLAGS)
8ce85a
		@echo
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)
45b33c
		@echo
45b33c
		@echo USE_CUSTOM_CFGDEFS:'     '$(USE_CUSTOM_CFGDEFS)
45b33c
		@echo USE_CUSTOM_USRDEFS:'     '$(USE_CUSTOM_USRDEFS)
5b28e8
0ee66a
.display-host:
0ee66a
		@$(CC) $(CFLAGS) -dumpmachine
0ee66a
09d985
.display-cc:
09d985
		@echo $(CC)
09d985
23bc8e
.display-cflags:
23bc8e
		@echo $(CFLAGS)
23bc8e
d40d13
c68106
.PHONY:		package-app \
1cc0e3
		all install shared static app \
781ac1
		shared-objs shared-lib \
218dfc
		shared-soname shared-solink \
218dfc
		package-shared-soname package-shared-solink \
d40d13
		static-objs static-lib \
d40d13
		default-app shared-app static-app \
781ac1
		install-shared install-static \
218dfc
		install-soname install-solink \
218dfc
		package-install-soname package-install-solink \
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 \
c63c37
		.display-pe .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