Blame Makefile.in

cde03b
PACKAGE 		= @package@
ee3e67
NICKNAME 		= @nickname@
cde03b
PROJECT_DIR 		= @project_dir@
f7b445
SOURCE_DIR 		= @source_dir@
2c9cf6
GIT_REFERENCE_INDEX	= @git_reference_index@
bcd956
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
53e4f7
AVOID_VERSION		= @avoid_version@
cde03b
b9138e
PKGNAME			= @pkgname@
b9138e
PKGDESC			= @pkgdesc@
b9138e
PKGUSRC			= @pkgusrc@
b9138e
PKGREPO			= @pkgrepo@
b9138e
PKGPSRC			= @pkgpsrc@
b9138e
PKGDURL			= @pkgdurl@
b9138e
PKGDEFS			= @pkgdefs@
b9138e
PKGLIBS			= @pkglibs@
b9138e
cde03b
BUILD 			= @build@
cde03b
HOST 			= @host@
7e1d96
CCHOST 			= @cchost@
a18dc4
CFGHOST 		= @cfghost@
cde03b
TARGET 			= @target@
cde03b
ARCH 			= @arch@
d015ab
COMPILER 		= @compiler@
e692ec
TOOLCHAIN		= @toolchain@
cde03b
SYSROOT 		= @sysroot@
cde03b
CROSS_COMPILE 		= @cross_compile@
cde03b
SHELL 			= @shell@
cde03b
3827e4
PREFIX 			= @prefix@
3827e4
EXEC_PREFIX 		= @exec_prefix@
3827e4
BINDIR 			= @bindir@
3827e4
SBINDIR 		= @sbindir@
3827e4
LIBDIR 			= @libdir@
3827e4
INCLUDEDIR 		= @includedir@
3827e4
OLDINCLUDEDIR 		= @oldincludedir@
3827e4
MANDIR 			= @mandir@
3827e4
DOCDIR 			= @docdir@
3827e4
LIBEXECDIR 		= @libexecdir@
3827e4
3827e4
SYSCONFDIR		= @sysconfdir@
3827e4
SHAREDSTATEDIR		= @sharedstatedir@
3827e4
LOCALSTATEDIR		= @localstatedir@
3827e4
RUNSTATEDIR		= @runstatedir@
3827e4
DATAROOTDIR		= @datarootdir@
3827e4
DATADIR			= @datadir@
3827e4
INFODIR			= @infodir@
3827e4
LOCALEDIR		= @localedir@
3827e4
HTMLDIR			= @htmldir@
3827e4
DVIDIR			= @dvidir@
3827e4
PDFDIR			= @pdfdir@
3827e4
PSDIR			= @psdir@
3827e4
b8199b
CFLAGS_COMMON 		+= @cflags_common@
b8199b
CFLAGS_DEBUG 		+= @cflags_debug@
b8199b
CFLAGS_CMDLINE 		+= @cflags_cmdline@
b8199b
CFLAGS_CONFIG 		+= @cflags_config@
b8199b
CFLAGS_SYSROOT 		+= @cflags_sysroot@
b8199b
CFLAGS_OS		+= @cflags_os@
b8199b
CFLAGS_SITE		+= @cflags_site@
b8199b
CFLAGS_PATH 		+= @cflags_path@
b8199b
CFLAGS_STRICT 		+= @cflags_strict@
b8199b
CFLAGS_UTIL 		+= @cflags_util@
b8199b
CFLAGS_LAST 		+= @cflags_last@
b8199b
CFLAGS_ONCE 		+= @cflags_once@
b8199b
b8199b
LDFLAGS_COMMON 		+= @ldflags_common@
b8199b
LDFLAGS_DEBUG 		+= @ldflags_debug@
b8199b
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
b8199b
LDFLAGS_CONFIG 		+= @ldflags_config@
b8199b
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
b8199b
LDFLAGS_PATH 		+= @ldflags_path@
b8199b
LDFLAGS_STRICT 		+= @ldflags_strict@
b8199b
LDFLAGS_UTIL 		+= @ldflags_util@
b8199b
LDFLAGS_LAST 		+= @ldflags_last@
b8199b
LDFLAGS_ONCE 		+= @ldflags_once@
cde03b
3827e4
USER_CC                 = @user_cc@
3827e4
USER_CPP                = @user_cpp@
3827e4
USER_CXX                = @user_cxx@
3827e4
b8199b
NATIVE_HOST		= @native_host@
b8199b
NATIVE_CFGHOST		= @native_cfghost@
b8199b
NATIVE_CFLAGS		= @native_cflags@
b8199b
NATIVE_LDFLAGS		= @native_ldflags@
cde03b
840c66
ALL_SHARED              = @all_shared@
840c66
ALL_STATIC              = @all_static@
d48c74
DISABLE_FRONTEND	= @disable_frontend@
840c66
DISABLE_SHARED          = @disable_shared@
840c66
DISABLE_STATIC          = @disable_static@
cde03b
e271dd
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
e271dd
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
e271dd
665fba
.SUFFIXES:
665fba
cde03b
all:
cde03b
install:
cde03b
shared:
cde03b
static:
cde03b
ba4569
install-extras:
ba4569
install-app-extras:
cde03b
b8199b
include ./ccenv/host.mk
b8199b
include ./ccenv/native.mk
cde03b
2f4555
include ./cfgdefs.mk
2f4555
include ./usrdefs.mk
e9c437
6afb06
include $(PROJECT_DIR)/sofort/core/defs.mk
6afb06
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
6afb06
include $(PROJECT_DIR)/sofort/core/version.mk
6afb06
include $(PROJECT_DIR)/sofort/core/flavor.mk
5694f7
2f4555
include $(PROJECT_DIR)/project/osforce.mk
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
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
cde03b
f7b445
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
cde03b
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
cde03b
f7b445
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
cde03b
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
cde03b
6aebc4
lib/%$(OS_LIB_PREFIXED_SUFFIX)$(VER_XYZ)$(OS_LIB_SUFFIXED_SUFFIX):
cde03b
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
cde03b
f7145f
lib/%$(OS_ARCHIVE_EXT):
f7145f
		mkdir -p lib
cde03b
		rm -f $@
5cdf33
		$(AR) rcs $@ $^
cde03b
cde03b
cde03b
840c66
all:		package-shared package-static app
cde03b
d48c74
install:	package-install-app
d48c74
install:	package-install-extras
840c66
install:	install-libs
cde03b
d48c74
app:		app-tag
31ed66
e25045
app.tag:
31ed66
		cp $(PACKAGE_APP) $(APP)
31ed66
		touch app.tag
cde03b
840c66
install-libs:	package-install-shared
840c66
install-libs:	package-install-static
cde03b
bcd956
install-headers-default:
a96974
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
a96974
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
cde03b
53e4f7
install-shared:	shared install-lib install-implib
53e4f7
install-shared: package-install-soname package-install-solink
b3c01c
install-shared: install-headers
d14c96
d14c96
install-lib:	shared
a96974
		mkdir -p $(DESTDIR)$(LIBDIR)
a96974
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
cde03b
b3c01c
install-static:	static install-headers
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
f89e82
install-static-app:	static-app install-app-extras
f89e82
			mkdir -p $(DESTDIR)$(BINDIR)
f89e82
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
f89e82
cde03b
cde03b
53e4f7
shared:		shared-lib implib
53e4f7
shared:		package-shared-soname package-shared-solink
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
31ed66
default-app:	version.tag static-objs $(DEFAULT_APP)
cde03b
cde03b
shared-app:	version.tag shared $(SHARED_APP)
cde03b
31ed66
static-app:	version.tag static-objs $(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)
885c20
$(SHARED_LIB):	LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)
cde03b
cde03b
$(STATIC_LIB):	$(STATIC_OBJS)
cde03b
31ed66
$(APP):		$(PACKAGE_APP)
cde03b
cde03b
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
31ed66
		rm -f app.tag
cde03b
		$(CC) -o $@ $^ $(LDFLAGS_APP)
cde03b
591e8d
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
31ed66
		rm -f app.tag
87a476
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
cde03b
cde03b
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
31ed66
		rm -f app.tag
f6f914
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
cde03b
cde03b
507922
dirs: 		dirs.tag
cde03b
cde03b
dirs.tag:
a70856
		mkdir -p build
c5b3f2
		mkdir -p bin
c5b3f2
		mkdir -p lib
cde03b
		touch dirs.tag
cde03b
cde03b
host.tag:	Makefile
6d1fc0
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
6d1fc0
		mv host.tmp host.tag
9a5af6
a70856
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
6afb06
		$(PROJECT_DIR)/sofort/tools/version.sh	\
f7b445
			-s $(SOURCE_DIR)		\
cde03b
			-o build/$(PACKAGE)_version.h	\
cde03b
			-p $(PACKAGE)
cde03b
		touch version.tag
cde03b
cde03b
distclean:	clean
fc2f00
		rm -f cfgdefs.mk
fc2f00
		rm -f usrdefs.mk
cde03b
		rm -f Makefile
cde03b
5694f7
clean:		clean-implib
cde03b
		rm -f tree.tag
cde03b
		rm -f dirs.tag
cde03b
		rm -f host.tag
6d1fc0
		rm -f host.tmp
cde03b
		rm -f version.tag
97b592
		rm -f app.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)
6a9b40
		rm -f build/$(PACKAGE)_version.h
6a9b40
		rm -f build/$(PACKAGE).pc
cde03b
cde03b
ef8273
.display:	.display-project .display-pkgconf .display-env \
ef8273
		.display-tools   .display-flags                \
ef8273
		.display-dirs    .display-build                \
ef8273
		.display-config
cde03b
e1d501
.conf:		PAGER ?= less
e1d501
.conf:
e1d501
		$(MAKE) .display | $(PAGER)
e1d501
7c3a37
.display-project:
83a40e
		@echo PACKAGE:'                '$(PACKAGE)
83a40e
		@echo NICKNAME:'               '$(NICKNAME)
7c3a37
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
eceb2a
		@echo SOURCE_DIR:'             '$(SOURCE_DIR)
7c3a37
		@echo BUILD_DIR:'              '$(CURDIR)
7c3a37
		@echo
7c3a37
b9138e
.display-pkgconf:
b9138e
		@echo PKGNAME:'                '$(PKGNAME)
b9138e
		@echo PKGDESC:'                '$(PKGDESC)
b9138e
		@echo PKGUSRC:'                '$(PKGUSRC)
b9138e
		@echo PKGREPO:'                '$(PKGREPO)
b9138e
		@echo PKGPSRC:'                '$(PKGPSRC)
b9138e
		@echo PKGDURL:'                '$(PKGDURL)
b9138e
		@echo PKGDEFS:'                '$(PKGDEFS)
b9138e
		@echo PKGLIBS:'                '$(PKGLIBS)
b9138e
		@echo
b9138e
cde03b
.display-env:
cde03b
		@echo BUILD:'                  '$(BUILD)
cde03b
		@echo HOST:'                   '$(HOST)
7e1d96
		@echo CCHOST:'                 '$(CCHOST)
a18dc4
		@echo CFGHOST:'                '$(CFGHOST)
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)
bec9ab
		@echo CFLAGS_STRICT:'          '$(CFLAGS_STRICT)
a5d617
		@echo CFLAGS_UTIL:'            '$(CFLAGS_UTIL)
9f6e4d
		@echo CFLAGS_LAST:'            '$(CFLAGS_LAST)
9f6e4d
		@echo CFLAGS_ONCE:'            '$(CFLAGS_ONCE)
cde03b
		@echo
a8369d
		@echo LDFLAGS_COMMON:'         '$(LDFLAGS_COMMON)
a8369d
		@echo LDFLAGS_DEBUG:'          '$(LDFLAGS_DEBUG)
a8369d
		@echo LDFLAGS_CMDLINE:'        '$(LDFLAGS_CMDLINE)
a8369d
		@echo LDFLAGS_CONFIG:'         '$(LDFLAGS_CONFIG)
a8369d
		@echo LDFLAGS_SYSROOT:'        '$(LDFLAGS_SYSROOT)
a8369d
		@echo LDFLAGS_PATH:'           '$(LDFLAGS_PATH)
bec9ab
		@echo LDFLAGS_STRICT:'         '$(LDFLAGS_STRICT)
a8369d
		@echo LDFLAGS_UTIL:'           '$(LDFLAGS_UTIL)
9f6e4d
		@echo LDFLAGS_LAST:'           '$(LDFLAGS_LAST)
9f6e4d
		@echo LDFLAGS_ONCE:'           '$(LDFLAGS_ONCE)
cde03b
		@echo
cde03b
cde03b
.display-pe:
cde03b
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
cde03b
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
cde03b
		@echo
cde03b
cde03b
.display-dirs:
cde03b
		@echo PREFIX:'                 '$(PREFIX)
17f6d3
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
cde03b
		@echo BINDIR:'                 '$(BINDIR)
a6f38d
		@echo SBINDIR:'                '$(SBINDIR)
cde03b
		@echo LIBDIR:'                 '$(LIBDIR)
cde03b
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
7f5702
		@echo OLDINCLUDEDIR:'          '$(OLDINCLUDEDIR)
cde03b
		@echo MANDIR:'                 '$(MANDIR)
cde03b
		@echo DOCDIR:'                 '$(DOCDIR)
cde03b
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
cde03b
		@echo
cde03b
7f5702
.display-exdirs:
7f5702
		@echo SYSCONFDIR'              '$(SYSCONFDIR)
7f5702
		@echo SHAREDSTATEDIR'          '$(SHAREDSTATEDIR)
7f5702
		@echo LOCALSTATEDIR'           '$(LOCALSTATEDIR)
7f5702
		@echo RUNSTATEDIR'             '$(RUNSTATEDIR)
7f5702
		@echo DATAROOTDIR'             '$(DATAROOTDIR)
7f5702
		@echo DATADIR'                 '$(DATADIR)
7f5702
		@echo INFODIR'                 '$(INFODIR)
7f5702
		@echo LOCALEDIR'               '$(LOCALEDIR)
7f5702
		@echo HTMLDIR'                 '$(HTMLDIR)
7f5702
		@echo DVIDIR'                  '$(DVIDIR)
7f5702
		@echo PDFDIR'                  '$(PDFDIR)
7f5702
		@echo PSDIR'                   '$(PSDIR)
7f5702
cde03b
.display-build:
cde03b
		@echo NATIVE_CC:'              '$(NATIVE_CC)
b8199b
		@echo NATIVE_CPP:'             '$(NATIVE_CPP)
b8199b
		@echo NATIVE_CXX:'             '$(NATIVE_CXX)
b8199b
b8199b
		@echo NATIVE_HOST:'            '$(NATIVE_HOST)
b8199b
		@echo NATIVE_CFGHOST:'         '$(NATIVE_CFGHOST)
b8199b
		@echo NATIVE_CFLAGS:'          '$(NATIVE_CFLAGS)
b8199b
		@echo NATIVE_LDFLAGS:'         '$(NATIVE_LDFLAGS)
9a5af6
		@echo
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
840c66
.display-config:
840c66
		@echo ALL_SHARED:'             '$(ALL_SHARED)
840c66
		@echo ALL_STATIC:'             '$(ALL_STATIC)
d48c74
		@echo DISABLE_FRONTEND:'       '$(DISABLE_FRONTEND)
840c66
		@echo DISABLE_SHARED:'         '$(DISABLE_SHARED)
840c66
		@echo DISABLE_STATIC:'         '$(DISABLE_STATIC)
e271dd
		@echo
e271dd
		@echo USE_CUSTOM_CFGDEFS:'     '$(USE_CUSTOM_CFGDEFS)
e271dd
		@echo USE_CUSTOM_USRDEFS:'     '$(USE_CUSTOM_USRDEFS)
840c66
428bd0
.display-host:
428bd0
		@$(CC) $(CFLAGS) -dumpmachine
428bd0
63c759
.display-cc:
63c759
		@echo $(CC)
63c759
41ce99
.display-cflags:
41ce99
		@echo $(CFLAGS)
41ce99
cde03b
6d1fc0
.PHONY:		package-app \
7e1d96
		all install shared static app \
5694f7
		shared-objs shared-lib \
53e4f7
		shared-soname shared-solink \
53e4f7
		package-shared-soname package-shared-solink \
cde03b
		static-objs static-lib \
cde03b
		default-app shared-app static-app \
5694f7
		install-shared install-static \
53e4f7
		install-soname install-solink \
53e4f7
		package-install-soname package-install-solink \
cde03b
		install-headers install-app \
e1aa5d
		install-headers-default install-headers-custom \
5694f7
		clean distclean clean-implib version \
e1d501
		.display .conf \
7c3a37
		.display-project .display-env .display-tools .display-flags \
c125a0
		.display-pe .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