Blame Makefile.in

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