Blame Makefile.in

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