Blame Makefile.in

7b83a9
PACKAGE 		= @package@
551024
NICKNAME 		= @nickname@
7b83a9
PROJECT_DIR 		= @project_dir@
44e93e
SOURCE_DIR 		= @source_dir@
fa9462
GIT_REFERENCE_INDEX	= @git_reference_index@
551024
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
551024
AVOID_VERSION		= @avoid_version@
7b83a9
787d15
PKGNAME			= @pkgname@
787d15
PKGDESC			= @pkgdesc@
787d15
PKGUSRC			= @pkgusrc@
787d15
PKGREPO			= @pkgrepo@
787d15
PKGPSRC			= @pkgpsrc@
787d15
PKGDURL			= @pkgdurl@
787d15
PKGDEFS			= @pkgdefs@
787d15
PKGLIBS			= @pkglibs@
787d15
7b83a9
BUILD 			= @build@
7b83a9
HOST 			= @host@
f6d035
CCHOST 			= @cchost@
299c71
CFGHOST 		= @cfghost@
7b83a9
TARGET 			= @target@
7b83a9
ARCH 			= @arch@
f97c34
COMPILER 		= @compiler@
651d7b
TOOLCHAIN		= @toolchain@
7b83a9
SYSROOT 		= @sysroot@
7b83a9
CROSS_COMPILE 		= @cross_compile@
7b83a9
SHELL 			= @shell@
7b83a9
e4b1f0
PREFIX 			= @prefix@
e4b1f0
EXEC_PREFIX 		= @exec_prefix@
e4b1f0
BINDIR 			= @bindir@
e4b1f0
SBINDIR 		= @sbindir@
e4b1f0
LIBDIR 			= @libdir@
e4b1f0
INCLUDEDIR 		= @includedir@
e4b1f0
OLDINCLUDEDIR 		= @oldincludedir@
e4b1f0
MANDIR 			= @mandir@
e4b1f0
DOCDIR 			= @docdir@
e4b1f0
LIBEXECDIR 		= @libexecdir@
e4b1f0
e4b1f0
SYSCONFDIR		= @sysconfdir@
e4b1f0
SHAREDSTATEDIR		= @sharedstatedir@
e4b1f0
LOCALSTATEDIR		= @localstatedir@
e4b1f0
RUNSTATEDIR		= @runstatedir@
e4b1f0
DATAROOTDIR		= @datarootdir@
e4b1f0
DATADIR			= @datadir@
e4b1f0
INFODIR			= @infodir@
e4b1f0
LOCALEDIR		= @localedir@
e4b1f0
HTMLDIR			= @htmldir@
e4b1f0
DVIDIR			= @dvidir@
e4b1f0
PDFDIR			= @pdfdir@
e4b1f0
PSDIR			= @psdir@
e4b1f0
d49db1
CFLAGS_COMMON 		+= @cflags_common@
d49db1
CFLAGS_DEBUG 		+= @cflags_debug@
d49db1
CFLAGS_CMDLINE 		+= @cflags_cmdline@
d49db1
CFLAGS_CONFIG 		+= @cflags_config@
d49db1
CFLAGS_SYSROOT 		+= @cflags_sysroot@
d49db1
CFLAGS_OS		+= @cflags_os@
d49db1
CFLAGS_SITE		+= @cflags_site@
d49db1
CFLAGS_PATH 		+= @cflags_path@
d49db1
CFLAGS_STRICT 		+= @cflags_strict@
d49db1
CFLAGS_UTIL 		+= @cflags_util@
d49db1
CFLAGS_LAST 		+= @cflags_last@
d49db1
CFLAGS_ONCE 		+= @cflags_once@
d49db1
d49db1
LDFLAGS_COMMON 		+= @ldflags_common@
d49db1
LDFLAGS_DEBUG 		+= @ldflags_debug@
d49db1
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
d49db1
LDFLAGS_CONFIG 		+= @ldflags_config@
d49db1
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
d49db1
LDFLAGS_PATH 		+= @ldflags_path@
d49db1
LDFLAGS_STRICT 		+= @ldflags_strict@
d49db1
LDFLAGS_UTIL 		+= @ldflags_util@
d49db1
LDFLAGS_LAST 		+= @ldflags_last@
d49db1
LDFLAGS_ONCE 		+= @ldflags_once@
7b83a9
e4b1f0
USER_CC                 = @user_cc@
e4b1f0
USER_CPP                = @user_cpp@
e4b1f0
USER_CXX                = @user_cxx@
e4b1f0
d49db1
NATIVE_HOST		= @native_host@
d49db1
NATIVE_CFGHOST		= @native_cfghost@
d49db1
NATIVE_CFLAGS		= @native_cflags@
d49db1
NATIVE_LDFLAGS		= @native_ldflags@
7b83a9
551024
ALL_SHARED              = @all_shared@
551024
ALL_STATIC              = @all_static@
551024
DISABLE_FRONTEND	= @disable_frontend@
551024
DISABLE_SHARED          = @disable_shared@
551024
DISABLE_STATIC          = @disable_static@
7b83a9
bc1187
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
bc1187
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
bc1187
0eab40
.SUFFIXES:
0eab40
7b83a9
all:
7b83a9
install:
7b83a9
shared:
7b83a9
static:
7b83a9
551024
install-extras:
551024
install-app-extras:
7b83a9
d49db1
include ./ccenv/host.mk
d49db1
include ./ccenv/native.mk
7b83a9
afef57
include ./cfgdefs.mk
afef57
include ./usrdefs.mk
fa2b40
474ea8
include $(PROJECT_DIR)/sofort/core/defs.mk
474ea8
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
474ea8
include $(PROJECT_DIR)/sofort/core/version.mk
474ea8
include $(PROJECT_DIR)/sofort/core/flavor.mk
551024
afef57
include $(PROJECT_DIR)/project/osforce.mk
7b83a9
include $(PROJECT_DIR)/project/tree.mk
7b83a9
include $(PROJECT_DIR)/project/depends.mk
7b83a9
include $(PROJECT_DIR)/project/headers.mk
7b83a9
include $(PROJECT_DIR)/project/common.mk
7b83a9
include $(PROJECT_DIR)/project/arch.mk
7b83a9
include $(PROJECT_DIR)/project/extras.mk
7b83a9
include $(PROJECT_DIR)/project/overrides.mk
7b83a9
7b83a9
551024
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
551024
44e93e
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
7b83a9
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
7b83a9
44e93e
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
7b83a9
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
7b83a9
46b4ff
lib/%$(OS_LIB_PREFIXED_SUFFIX)$(VER_XYZ)$(OS_LIB_SUFFIXED_SUFFIX):
551024
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
7b83a9
d79946
lib/%$(OS_ARCHIVE_EXT):
d79946
		mkdir -p lib
7b83a9
		rm -f $@
84d36b
		$(AR) rcs $@ $^
7b83a9
7b83a9
7b83a9
551024
all:		package-shared package-static app
551024
551024
install:	package-install-app
551024
install:	package-install-extras
551024
install:	install-libs
7b83a9
551024
app:		app-tag
7b83a9
551024
app.tag:
551024
		cp $(PACKAGE_APP) $(APP)
551024
		touch app.tag
7b83a9
551024
install-libs:	package-install-shared
551024
install-libs:	package-install-static
7b83a9
551024
install-headers-default:
738516
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
738516
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
7b83a9
551024
install-shared:	shared install-lib install-implib
551024
install-shared: package-install-soname package-install-solink
551024
install-shared: install-headers
551024
551024
install-lib:	shared
738516
		mkdir -p $(DESTDIR)$(LIBDIR)
738516
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
7b83a9
551024
install-static:	static install-headers
738516
		mkdir -p $(DESTDIR)$(LIBDIR)
738516
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
7b83a9
551024
install-app:	app install-app-extras
551024
		mkdir -p $(DESTDIR)$(BINDIR)
551024
		cp $(APP) $(DESTDIR)$(BINDIR)
551024
551024
install-static-app:	static-app install-app-extras
551024
			mkdir -p $(DESTDIR)$(BINDIR)
551024
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
7b83a9
7b83a9
551024
551024
shared:		shared-lib implib
551024
shared:		package-shared-soname package-shared-solink
7b83a9
7b83a9
static:		static-lib
7b83a9
7b83a9
shared-lib:	shared-objs $(SHARED_LIB)
7b83a9
551024
shared-soname:	shared-lib $(SHARED_SONAME)
551024
551024
shared-solink:	shared-lib $(SHARED_SOLINK)
551024
7b83a9
static-lib:	static-objs $(STATIC_LIB)
7b83a9
551024
551024
551024
default-app:	version.tag static-objs $(DEFAULT_APP)
551024
551024
shared-app:	version.tag shared $(SHARED_APP)
551024
551024
static-app:	version.tag static-objs $(STATIC_APP)
7b83a9
7b83a9
7b83a9
7b83a9
shared-objs:	dirs $(SHARED_OBJS)
7b83a9
7b83a9
static-objs:	dirs $(STATIC_OBJS)
7b83a9
551024
app-objs:	dirs $(APP_OBJS)
551024
7b83a9
7b83a9
7b83a9
$(SHARED_LIB):	$(SHARED_OBJS)
52dba3
$(SHARED_LIB):	LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)
7b83a9
7b83a9
$(STATIC_LIB):	$(STATIC_OBJS)
7b83a9
551024
$(APP):		$(PACKAGE_APP)
551024
551024
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
551024
		rm -f app.tag
551024
		$(CC) -o $@ $^ $(LDFLAGS_APP)
7b83a9
f9d98c
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
551024
		rm -f app.tag
478dbd
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
551024
551024
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
551024
		rm -f app.tag
551024
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
551024
551024
551024
dirs: 		dirs.tag
7b83a9
7b83a9
dirs.tag:
d3455c
		mkdir -p build
551024
		mkdir -p bin
defe80
		mkdir -p lib
7b83a9
		touch dirs.tag
7b83a9
7b83a9
host.tag:	Makefile
647d34
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
647d34
		mv host.tmp host.tag
714601
d3455c
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
474ea8
		$(PROJECT_DIR)/sofort/tools/version.sh	\
44e93e
			-s $(SOURCE_DIR)		\
551024
			-o build/$(PACKAGE)_version.h	\
551024
			-p $(PACKAGE)
551024
		touch version.tag
551024
7b83a9
distclean:	clean
9c8e9f
		rm -f cfgdefs.mk
9c8e9f
		rm -f usrdefs.mk
7b83a9
		rm -f Makefile
7b83a9
551024
clean:		clean-implib
7b83a9
		rm -f tree.tag
7b83a9
		rm -f dirs.tag
7b83a9
		rm -f host.tag
647d34
		rm -f host.tmp
551024
		rm -f version.tag
551024
		rm -f app.tag
7b83a9
		rm -f $(SHARED_OBJS)
7b83a9
		rm -f $(STATIC_OBJS)
551024
		rm -f $(APP_OBJS)
7b83a9
		rm -f $(SHARED_LIB)
551024
		rm -f $(SHARED_SONAME)
551024
		rm -f $(SHARED_SOLINK)
7b83a9
		rm -f $(STATIC_LIB)
551024
		rm -f $(APP)
551024
		rm -f $(DEFAULT_APP)
551024
		rm -f $(SHARED_APP)
551024
		rm -f $(STATIC_APP)
22f429
		rm -f build/$(PACKAGE)_version.h
22f429
		rm -f build/$(PACKAGE).pc
7b83a9
7b83a9
105310
.display:	.display-project .display-pkgconf .display-env \
105310
		.display-tools   .display-flags                \
105310
		.display-dirs    .display-build                \
105310
		.display-config
551024
551024
.conf:		PAGER ?= less
551024
.conf:
551024
		$(MAKE) .display | $(PAGER)
7b83a9
31ef73
.display-project:
551024
		@echo PACKAGE:'                '$(PACKAGE)
551024
		@echo NICKNAME:'               '$(NICKNAME)
31ef73
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
6eaf4a
		@echo SOURCE_DIR:'             '$(SOURCE_DIR)
31ef73
		@echo BUILD_DIR:'              '$(CURDIR)
31ef73
		@echo
31ef73
787d15
.display-pkgconf:
787d15
		@echo PKGNAME:'                '$(PKGNAME)
787d15
		@echo PKGDESC:'                '$(PKGDESC)
787d15
		@echo PKGUSRC:'                '$(PKGUSRC)
787d15
		@echo PKGREPO:'                '$(PKGREPO)
787d15
		@echo PKGPSRC:'                '$(PKGPSRC)
787d15
		@echo PKGDURL:'                '$(PKGDURL)
787d15
		@echo PKGDEFS:'                '$(PKGDEFS)
787d15
		@echo PKGLIBS:'                '$(PKGLIBS)
787d15
		@echo
787d15
7b83a9
.display-env:
7b83a9
		@echo BUILD:'                  '$(BUILD)
7b83a9
		@echo HOST:'                   '$(HOST)
f6d035
		@echo CCHOST:'                 '$(CCHOST)
299c71
		@echo CFGHOST:'                '$(CFGHOST)
7b83a9
		@echo TARGET:'                 '$(TARGET)
7b83a9
		@echo ARCH:'                   '$(ARCH)
f97c34
		@echo COMPILER:'               '$(COMPILER)
651d7b
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
7b83a9
		@echo SYSROOT:'                '$(SYSROOT)
612929
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
7b83a9
		@echo SHELL:'                  '$(SHELL)
967e4d
		@echo
7b83a9
7b83a9
.display-tools:
7b83a9
		@echo CC:'                     '$(CC)
7b83a9
		@echo CPP:'                    '$(CPP)
7b83a9
		@echo CXX:'                    '$(CXX)
7b83a9
		@echo
7b83a9
		@echo AS:'                     '$(AS)
7b83a9
		@echo AR:'                     '$(AR)
7b83a9
		@echo LD:'                     '$(LD)
7b83a9
		@echo NM:'                     '$(NM)
7b83a9
		@echo OBJDUMP:'                '$(OBJDUMP)
7b83a9
		@echo RANLIB:'                 '$(RANLIB)
7b83a9
		@echo SIZE:'                   '$(SIZE)
7b83a9
		@echo STRIP:'                  '$(STRIP)
7b83a9
		@echo STRINGS:'                '$(STRINGS)
7b83a9
		@echo
7b83a9
		@echo ADDR2LINE:'              '$(ADDR2LINE)
7b83a9
		@echo COV:'                    '$(COV)
7b83a9
		@echo CXXFILT'                 '$(CXXFILT)
7b83a9
		@echo ELFEDIT:'                '$(ELFEDIT)
7b83a9
		@echo OBJCOPY:'                '$(OBJCOPY)
7b83a9
		@echo READELF:'                '$(READELF)
7b83a9
		@echo
7b83a9
7b83a9
.display-flags:
7b83a9
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
551024
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
551024
		@echo CFLAGS_VERSION:'         '$(CFLAGS_VERSION)
7b83a9
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
7b83a9
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
7b83a9
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
551024
		@echo CFLAGS_OS:'              '$(CFLAGS_OS)
551024
		@echo CFLAGS_SITE:'            '$(CFLAGS_SITE)
7b83a9
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
551024
		@echo CFLAGS_STRICT:'          '$(CFLAGS_STRICT)
551024
		@echo CFLAGS_UTIL:'            '$(CFLAGS_UTIL)
8da1ad
		@echo CFLAGS_LAST:'            '$(CFLAGS_LAST)
8da1ad
		@echo CFLAGS_ONCE:'            '$(CFLAGS_ONCE)
7b83a9
		@echo
551024
		@echo LDFLAGS_COMMON:'         '$(LDFLAGS_COMMON)
551024
		@echo LDFLAGS_DEBUG:'          '$(LDFLAGS_DEBUG)
551024
		@echo LDFLAGS_CMDLINE:'        '$(LDFLAGS_CMDLINE)
551024
		@echo LDFLAGS_CONFIG:'         '$(LDFLAGS_CONFIG)
551024
		@echo LDFLAGS_SYSROOT:'        '$(LDFLAGS_SYSROOT)
551024
		@echo LDFLAGS_PATH:'           '$(LDFLAGS_PATH)
551024
		@echo LDFLAGS_STRICT:'         '$(LDFLAGS_STRICT)
551024
		@echo LDFLAGS_UTIL:'           '$(LDFLAGS_UTIL)
8da1ad
		@echo LDFLAGS_LAST:'           '$(LDFLAGS_LAST)
8da1ad
		@echo LDFLAGS_ONCE:'           '$(LDFLAGS_ONCE)
7b83a9
		@echo
7b83a9
7b83a9
.display-pe:
7b83a9
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
7b83a9
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
7b83a9
		@echo
7b83a9
7b83a9
.display-dirs:
7b83a9
		@echo PREFIX:'                 '$(PREFIX)
2816af
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
7b83a9
		@echo BINDIR:'                 '$(BINDIR)
71a82d
		@echo SBINDIR:'                '$(SBINDIR)
7b83a9
		@echo LIBDIR:'                 '$(LIBDIR)
7b83a9
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
a719b2
		@echo OLDINCLUDEDIR:'          '$(OLDINCLUDEDIR)
7b83a9
		@echo MANDIR:'                 '$(MANDIR)
7b83a9
		@echo DOCDIR:'                 '$(DOCDIR)
7b83a9
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
7b83a9
		@echo
7b83a9
a719b2
.display-exdirs:
a719b2
		@echo SYSCONFDIR'              '$(SYSCONFDIR)
a719b2
		@echo SHAREDSTATEDIR'          '$(SHAREDSTATEDIR)
a719b2
		@echo LOCALSTATEDIR'           '$(LOCALSTATEDIR)
a719b2
		@echo RUNSTATEDIR'             '$(RUNSTATEDIR)
a719b2
		@echo DATAROOTDIR'             '$(DATAROOTDIR)
a719b2
		@echo DATADIR'                 '$(DATADIR)
a719b2
		@echo INFODIR'                 '$(INFODIR)
a719b2
		@echo LOCALEDIR'               '$(LOCALEDIR)
a719b2
		@echo HTMLDIR'                 '$(HTMLDIR)
a719b2
		@echo DVIDIR'                  '$(DVIDIR)
a719b2
		@echo PDFDIR'                  '$(PDFDIR)
a719b2
		@echo PSDIR'                   '$(PSDIR)
a719b2
7b83a9
.display-build:
7b83a9
		@echo NATIVE_CC:'              '$(NATIVE_CC)
d49db1
		@echo NATIVE_CPP:'             '$(NATIVE_CPP)
d49db1
		@echo NATIVE_CXX:'             '$(NATIVE_CXX)
d49db1
d49db1
		@echo NATIVE_HOST:'            '$(NATIVE_HOST)
d49db1
		@echo NATIVE_CFGHOST:'         '$(NATIVE_CFGHOST)
d49db1
		@echo NATIVE_CFLAGS:'          '$(NATIVE_CFLAGS)
d49db1
		@echo NATIVE_LDFLAGS:'         '$(NATIVE_LDFLAGS)
714601
		@echo
7b83a9
		@echo NATIVE_OS:'              '$(NATIVE_OS)
7b83a9
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
292211
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
7b83a9
		@echo
2318d6
		@echo USER_CC:'                '$(USER_CC)
2318d6
		@echo USER_CPP:'               '$(USER_CPP)
2318d6
		@echo USER_CXX:'               '$(USER_CXX)
2318d6
		@echo
7b83a9
551024
.display-config:
551024
		@echo ALL_SHARED:'             '$(ALL_SHARED)
551024
		@echo ALL_STATIC:'             '$(ALL_STATIC)
551024
		@echo DISABLE_FRONTEND:'       '$(DISABLE_FRONTEND)
551024
		@echo DISABLE_SHARED:'         '$(DISABLE_SHARED)
551024
		@echo DISABLE_STATIC:'         '$(DISABLE_STATIC)
bc1187
		@echo
bc1187
		@echo USE_CUSTOM_CFGDEFS:'     '$(USE_CUSTOM_CFGDEFS)
bc1187
		@echo USE_CUSTOM_USRDEFS:'     '$(USE_CUSTOM_USRDEFS)
551024
551024
.display-host:
551024
		@$(CC) $(CFLAGS) -dumpmachine
551024
551024
.display-cc:
551024
		@echo $(CC)
551024
551024
.display-cflags:
551024
		@echo $(CFLAGS)
551024
7b83a9
647d34
.PHONY:		package-app \
f6d035
		all install shared static app \
551024
		shared-objs shared-lib \
551024
		shared-soname shared-solink \
551024
		package-shared-soname package-shared-solink \
7b83a9
		static-objs static-lib \
551024
		default-app shared-app static-app \
551024
		install-shared install-static \
551024
		install-soname install-solink \
551024
		package-install-soname package-install-solink \
551024
		install-headers install-app \
551024
		install-headers-default install-headers-custom \
551024
		clean distclean clean-implib version \
551024
		.display .conf \
31ef73
		.display-project .display-env .display-tools .display-flags \
9bb43c
		.display-pe .display-dirs .display-build \
551024
		implib implib-ver implib-soname implib-solink \
551024
		install-implib install-implib-ver \
551024
		install-implib-soname install-implib-solink