Blame Makefile.in

f46039
PACKAGE 		= @package@
78fd02
NICKNAME 		= @nickname@
f46039
PROJECT_DIR 		= @project_dir@
11deae
SOURCE_DIR 		= @source_dir@
269f6f
GIT_REFERENCE_INDEX	= @git_reference_index@
8dc59e
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
832c05
AVOID_VERSION		= @avoid_version@
f46039
32da4e
PKGNAME			= @pkgname@
32da4e
PKGDESC			= @pkgdesc@
32da4e
PKGUSRC			= @pkgusrc@
32da4e
PKGREPO			= @pkgrepo@
32da4e
PKGPSRC			= @pkgpsrc@
32da4e
PKGDURL			= @pkgdurl@
32da4e
PKGDEFS			= @pkgdefs@
32da4e
PKGLIBS			= @pkglibs@
32da4e
f46039
BUILD 			= @build@
f46039
HOST 			= @host@
c2225d
CCHOST 			= @cchost@
95d491
CFGHOST 		= @cfghost@
f46039
TARGET 			= @target@
f46039
ARCH 			= @arch@
e83fbe
COMPILER 		= @compiler@
46d732
TOOLCHAIN		= @toolchain@
f46039
SYSROOT 		= @sysroot@
f46039
CROSS_COMPILE 		= @cross_compile@
f46039
SHELL 			= @shell@
f46039
cbf7df
PREFIX 			= @prefix@
cbf7df
EXEC_PREFIX 		= @exec_prefix@
cbf7df
BINDIR 			= @bindir@
cbf7df
SBINDIR 		= @sbindir@
cbf7df
LIBDIR 			= @libdir@
cbf7df
INCLUDEDIR 		= @includedir@
cbf7df
OLDINCLUDEDIR 		= @oldincludedir@
cbf7df
MANDIR 			= @mandir@
cbf7df
DOCDIR 			= @docdir@
cbf7df
LIBEXECDIR 		= @libexecdir@
cbf7df
cbf7df
SYSCONFDIR		= @sysconfdir@
cbf7df
SHAREDSTATEDIR		= @sharedstatedir@
cbf7df
LOCALSTATEDIR		= @localstatedir@
cbf7df
RUNSTATEDIR		= @runstatedir@
cbf7df
DATAROOTDIR		= @datarootdir@
cbf7df
DATADIR			= @datadir@
cbf7df
INFODIR			= @infodir@
cbf7df
LOCALEDIR		= @localedir@
cbf7df
HTMLDIR			= @htmldir@
cbf7df
DVIDIR			= @dvidir@
cbf7df
PDFDIR			= @pdfdir@
cbf7df
PSDIR			= @psdir@
cbf7df
af99a0
CFLAGS_COMMON 		+= @cflags_common@
af99a0
CFLAGS_DEBUG 		+= @cflags_debug@
af99a0
CFLAGS_CMDLINE 		+= @cflags_cmdline@
af99a0
CFLAGS_CONFIG 		+= @cflags_config@
af99a0
CFLAGS_SYSROOT 		+= @cflags_sysroot@
af99a0
CFLAGS_OS		+= @cflags_os@
af99a0
CFLAGS_SITE		+= @cflags_site@
af99a0
CFLAGS_PATH 		+= @cflags_path@
af99a0
CFLAGS_STRICT 		+= @cflags_strict@
af99a0
CFLAGS_UTIL 		+= @cflags_util@
af99a0
CFLAGS_LAST 		+= @cflags_last@
af99a0
CFLAGS_ONCE 		+= @cflags_once@
af99a0
af99a0
LDFLAGS_COMMON 		+= @ldflags_common@
af99a0
LDFLAGS_DEBUG 		+= @ldflags_debug@
af99a0
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
af99a0
LDFLAGS_CONFIG 		+= @ldflags_config@
af99a0
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
af99a0
LDFLAGS_PATH 		+= @ldflags_path@
af99a0
LDFLAGS_STRICT 		+= @ldflags_strict@
af99a0
LDFLAGS_UTIL 		+= @ldflags_util@
af99a0
LDFLAGS_LAST 		+= @ldflags_last@
af99a0
LDFLAGS_ONCE 		+= @ldflags_once@
f46039
cbf7df
USER_CC                 = @user_cc@
cbf7df
USER_CPP                = @user_cpp@
cbf7df
USER_CXX                = @user_cxx@
cbf7df
af99a0
NATIVE_HOST		= @native_host@
af99a0
NATIVE_CFGHOST		= @native_cfghost@
af99a0
NATIVE_CFLAGS		= @native_cflags@
af99a0
NATIVE_LDFLAGS		= @native_ldflags@
f46039
a8ab0d
ALL_SHARED              = @all_shared@
a8ab0d
ALL_STATIC              = @all_static@
54c1e4
DISABLE_FRONTEND	= @disable_frontend@
a8ab0d
DISABLE_SHARED          = @disable_shared@
a8ab0d
DISABLE_STATIC          = @disable_static@
f46039
3d5a30
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
3d5a30
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
3d5a30
f74bc7
.SUFFIXES:
f74bc7
f46039
all:
f46039
install:
f46039
shared:
f46039
static:
f46039
bdd4bb
install-extras:
bdd4bb
install-app-extras:
f46039
af99a0
include ./ccenv/host.mk
af99a0
include ./ccenv/native.mk
f46039
601fbe
include ./cfgdefs.mk
601fbe
include ./usrdefs.mk
8e6b56
77324f
include $(PROJECT_DIR)/sofort/core/defs.mk
77324f
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
77324f
include $(PROJECT_DIR)/sofort/core/version.mk
77324f
include $(PROJECT_DIR)/sofort/core/flavor.mk
b2d0f4
601fbe
include $(PROJECT_DIR)/project/osforce.mk
f46039
include $(PROJECT_DIR)/project/tree.mk
f46039
include $(PROJECT_DIR)/project/depends.mk
f46039
include $(PROJECT_DIR)/project/headers.mk
f46039
include $(PROJECT_DIR)/project/common.mk
f46039
include $(PROJECT_DIR)/project/arch.mk
f46039
include $(PROJECT_DIR)/project/extras.mk
f46039
include $(PROJECT_DIR)/project/overrides.mk
f46039
f46039
f46039
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
f46039
11deae
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
f46039
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
f46039
11deae
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
f46039
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
f46039
8941e3
lib/%$(OS_LIB_PREFIXED_SUFFIX)$(VER_XYZ)$(OS_LIB_SUFFIXED_SUFFIX):
f46039
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
f46039
cd6967
lib/%$(OS_ARCHIVE_EXT):
cd6967
		mkdir -p lib
f46039
		rm -f $@
c0cc78
		$(AR) rcs $@ $^
f46039
f46039
f46039
a8ab0d
all:		package-shared package-static app
f46039
54c1e4
install:	package-install-app
54c1e4
install:	package-install-extras
a8ab0d
install:	install-libs
f46039
54c1e4
app:		app-tag
c26f15
5d8ea8
app.tag:
c26f15
		cp $(PACKAGE_APP) $(APP)
c26f15
		touch app.tag
f46039
a8ab0d
install-libs:	package-install-shared
a8ab0d
install-libs:	package-install-static
f46039
8dc59e
install-headers-default:
d4de33
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
d4de33
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
f46039
832c05
install-shared:	shared install-lib install-implib
832c05
install-shared: package-install-soname package-install-solink
1bf01c
install-shared: install-headers
225022
225022
install-lib:	shared
d4de33
		mkdir -p $(DESTDIR)$(LIBDIR)
d4de33
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
f46039
1bf01c
install-static:	static install-headers
d4de33
		mkdir -p $(DESTDIR)$(LIBDIR)
d4de33
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
f46039
bdd4bb
install-app:	app install-app-extras
d4de33
		mkdir -p $(DESTDIR)$(BINDIR)
d4de33
		cp $(APP) $(DESTDIR)$(BINDIR)
f46039
34b9c7
install-static-app:	static-app install-app-extras
34b9c7
			mkdir -p $(DESTDIR)$(BINDIR)
34b9c7
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
34b9c7
f46039
f46039
832c05
shared:		shared-lib implib
832c05
shared:		package-shared-soname package-shared-solink
f46039
f46039
static:		static-lib
f46039
f46039
shared-lib:	shared-objs $(SHARED_LIB)
f46039
225022
shared-soname:	shared-lib $(SHARED_SONAME)
225022
225022
shared-solink:	shared-lib $(SHARED_SOLINK)
225022
f46039
static-lib:	static-objs $(STATIC_LIB)
f46039
f46039
f46039
c26f15
default-app:	version.tag static-objs $(DEFAULT_APP)
f46039
f46039
shared-app:	version.tag shared $(SHARED_APP)
f46039
c26f15
static-app:	version.tag static-objs $(STATIC_APP)
f46039
f46039
f46039
f46039
shared-objs:	dirs $(SHARED_OBJS)
f46039
f46039
static-objs:	dirs $(STATIC_OBJS)
f46039
f46039
app-objs:	dirs $(APP_OBJS)
f46039
f46039
f46039
f46039
$(SHARED_LIB):	$(SHARED_OBJS)
19aa5c
$(SHARED_LIB):	LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)
f46039
f46039
$(STATIC_LIB):	$(STATIC_OBJS)
f46039
c26f15
$(APP):		$(PACKAGE_APP)
f46039
f46039
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
c26f15
		rm -f app.tag
f46039
		$(CC) -o $@ $^ $(LDFLAGS_APP)
f46039
5fe6ce
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
c26f15
		rm -f app.tag
42c429
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
f46039
f46039
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
c26f15
		rm -f app.tag
d54f9b
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
f46039
f46039
3e9a60
dirs: 		dirs.tag
f46039
f46039
dirs.tag:
feb924
		mkdir -p build
1b0fc6
		mkdir -p bin
1b0fc6
		mkdir -p lib
f46039
		touch dirs.tag
f46039
f46039
host.tag:	Makefile
1ab21d
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
1ab21d
		mv host.tmp host.tag
63d3bb
feb924
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
77324f
		$(PROJECT_DIR)/sofort/tools/version.sh	\
11deae
			-s $(SOURCE_DIR)		\
f46039
			-o build/$(PACKAGE)_version.h	\
f46039
			-p $(PACKAGE)
f46039
		touch version.tag
f46039
f46039
distclean:	clean
aa54db
		rm -f cfgdefs.mk
aa54db
		rm -f usrdefs.mk
f46039
		rm -f Makefile
f46039
b2d0f4
clean:		clean-implib
f46039
		rm -f tree.tag
f46039
		rm -f dirs.tag
f46039
		rm -f host.tag
1ab21d
		rm -f host.tmp
f46039
		rm -f version.tag
d87d1a
		rm -f app.tag
f46039
		rm -f $(SHARED_OBJS)
f46039
		rm -f $(STATIC_OBJS)
f46039
		rm -f $(APP_OBJS)
f46039
		rm -f $(SHARED_LIB)
225022
		rm -f $(SHARED_SONAME)
225022
		rm -f $(SHARED_SOLINK)
f46039
		rm -f $(STATIC_LIB)
f46039
		rm -f $(APP)
f46039
		rm -f $(DEFAULT_APP)
f46039
		rm -f $(SHARED_APP)
f46039
		rm -f $(STATIC_APP)
02d0ec
		rm -f build/$(PACKAGE)_version.h
02d0ec
		rm -f build/$(PACKAGE).pc
f46039
f46039
88a802
.display:	.display-project .display-pkgconf .display-env \
88a802
		.display-tools   .display-flags                \
88a802
		.display-dirs    .display-build                \
88a802
		.display-config
f46039
0bf5e7
.conf:		PAGER ?= less
0bf5e7
.conf:
0bf5e7
		$(MAKE) .display | $(PAGER)
0bf5e7
40b609
.display-project:
75fc18
		@echo PACKAGE:'                '$(PACKAGE)
75fc18
		@echo NICKNAME:'               '$(NICKNAME)
40b609
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
ac3e66
		@echo SOURCE_DIR:'             '$(SOURCE_DIR)
40b609
		@echo BUILD_DIR:'              '$(CURDIR)
40b609
		@echo
40b609
32da4e
.display-pkgconf:
32da4e
		@echo PKGNAME:'                '$(PKGNAME)
32da4e
		@echo PKGDESC:'                '$(PKGDESC)
32da4e
		@echo PKGUSRC:'                '$(PKGUSRC)
32da4e
		@echo PKGREPO:'                '$(PKGREPO)
32da4e
		@echo PKGPSRC:'                '$(PKGPSRC)
32da4e
		@echo PKGDURL:'                '$(PKGDURL)
32da4e
		@echo PKGDEFS:'                '$(PKGDEFS)
32da4e
		@echo PKGLIBS:'                '$(PKGLIBS)
32da4e
		@echo
32da4e
f46039
.display-env:
f46039
		@echo BUILD:'                  '$(BUILD)
f46039
		@echo HOST:'                   '$(HOST)
c2225d
		@echo CCHOST:'                 '$(CCHOST)
95d491
		@echo CFGHOST:'                '$(CFGHOST)
f46039
		@echo TARGET:'                 '$(TARGET)
f46039
		@echo ARCH:'                   '$(ARCH)
e83fbe
		@echo COMPILER:'               '$(COMPILER)
46d732
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
f46039
		@echo SYSROOT:'                '$(SYSROOT)
239036
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
f46039
		@echo SHELL:'                  '$(SHELL)
f46039
		@echo
f46039
f46039
.display-tools:
f46039
		@echo CC:'                     '$(CC)
f46039
		@echo CPP:'                    '$(CPP)
f46039
		@echo CXX:'                    '$(CXX)
f46039
		@echo
f46039
		@echo AS:'                     '$(AS)
f46039
		@echo AR:'                     '$(AR)
f46039
		@echo LD:'                     '$(LD)
f46039
		@echo NM:'                     '$(NM)
f46039
		@echo OBJDUMP:'                '$(OBJDUMP)
f46039
		@echo RANLIB:'                 '$(RANLIB)
f46039
		@echo SIZE:'                   '$(SIZE)
f46039
		@echo STRIP:'                  '$(STRIP)
f46039
		@echo STRINGS:'                '$(STRINGS)
f46039
		@echo
f46039
		@echo ADDR2LINE:'              '$(ADDR2LINE)
f46039
		@echo COV:'                    '$(COV)
f46039
		@echo CXXFILT'                 '$(CXXFILT)
f46039
		@echo ELFEDIT:'                '$(ELFEDIT)
f46039
		@echo OBJCOPY:'                '$(OBJCOPY)
f46039
		@echo READELF:'                '$(READELF)
f46039
		@echo
f46039
f46039
.display-flags:
f46039
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
bbe942
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
225022
		@echo CFLAGS_VERSION:'         '$(CFLAGS_VERSION)
f46039
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
f46039
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
f46039
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
e6d235
		@echo CFLAGS_OS:'              '$(CFLAGS_OS)
e6d235
		@echo CFLAGS_SITE:'            '$(CFLAGS_SITE)
f46039
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
616138
		@echo CFLAGS_STRICT:'          '$(CFLAGS_STRICT)
a5b647
		@echo CFLAGS_UTIL:'            '$(CFLAGS_UTIL)
1ec01b
		@echo CFLAGS_LAST:'            '$(CFLAGS_LAST)
1ec01b
		@echo CFLAGS_ONCE:'            '$(CFLAGS_ONCE)
f46039
		@echo
94b335
		@echo LDFLAGS_COMMON:'         '$(LDFLAGS_COMMON)
94b335
		@echo LDFLAGS_DEBUG:'          '$(LDFLAGS_DEBUG)
94b335
		@echo LDFLAGS_CMDLINE:'        '$(LDFLAGS_CMDLINE)
94b335
		@echo LDFLAGS_CONFIG:'         '$(LDFLAGS_CONFIG)
94b335
		@echo LDFLAGS_SYSROOT:'        '$(LDFLAGS_SYSROOT)
94b335
		@echo LDFLAGS_PATH:'           '$(LDFLAGS_PATH)
616138
		@echo LDFLAGS_STRICT:'         '$(LDFLAGS_STRICT)
94b335
		@echo LDFLAGS_UTIL:'           '$(LDFLAGS_UTIL)
1ec01b
		@echo LDFLAGS_LAST:'           '$(LDFLAGS_LAST)
1ec01b
		@echo LDFLAGS_ONCE:'           '$(LDFLAGS_ONCE)
f46039
		@echo
f46039
f46039
.display-pe:
f46039
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
f46039
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
f46039
		@echo
f46039
f46039
.display-dirs:
f46039
		@echo PREFIX:'                 '$(PREFIX)
b6d1b5
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
f46039
		@echo BINDIR:'                 '$(BINDIR)
cb6e77
		@echo SBINDIR:'                '$(SBINDIR)
f46039
		@echo LIBDIR:'                 '$(LIBDIR)
f46039
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
227174
		@echo OLDINCLUDEDIR:'          '$(OLDINCLUDEDIR)
f46039
		@echo MANDIR:'                 '$(MANDIR)
f46039
		@echo DOCDIR:'                 '$(DOCDIR)
f46039
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
f46039
		@echo
f46039
227174
.display-exdirs:
227174
		@echo SYSCONFDIR'              '$(SYSCONFDIR)
227174
		@echo SHAREDSTATEDIR'          '$(SHAREDSTATEDIR)
227174
		@echo LOCALSTATEDIR'           '$(LOCALSTATEDIR)
227174
		@echo RUNSTATEDIR'             '$(RUNSTATEDIR)
227174
		@echo DATAROOTDIR'             '$(DATAROOTDIR)
227174
		@echo DATADIR'                 '$(DATADIR)
227174
		@echo INFODIR'                 '$(INFODIR)
227174
		@echo LOCALEDIR'               '$(LOCALEDIR)
227174
		@echo HTMLDIR'                 '$(HTMLDIR)
227174
		@echo DVIDIR'                  '$(DVIDIR)
227174
		@echo PDFDIR'                  '$(PDFDIR)
227174
		@echo PSDIR'                   '$(PSDIR)
227174
f46039
.display-build:
f46039
		@echo NATIVE_CC:'              '$(NATIVE_CC)
af99a0
		@echo NATIVE_CPP:'             '$(NATIVE_CPP)
af99a0
		@echo NATIVE_CXX:'             '$(NATIVE_CXX)
af99a0
af99a0
		@echo NATIVE_HOST:'            '$(NATIVE_HOST)
af99a0
		@echo NATIVE_CFGHOST:'         '$(NATIVE_CFGHOST)
af99a0
		@echo NATIVE_CFLAGS:'          '$(NATIVE_CFLAGS)
af99a0
		@echo NATIVE_LDFLAGS:'         '$(NATIVE_LDFLAGS)
63d3bb
		@echo
f46039
		@echo NATIVE_OS:'              '$(NATIVE_OS)
f46039
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
f46039
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
f46039
		@echo
f46039
		@echo USER_CC:'                '$(USER_CC)
f46039
		@echo USER_CPP:'               '$(USER_CPP)
f46039
		@echo USER_CXX:'               '$(USER_CXX)
f46039
		@echo
f46039
a8ab0d
.display-config:
a8ab0d
		@echo ALL_SHARED:'             '$(ALL_SHARED)
a8ab0d
		@echo ALL_STATIC:'             '$(ALL_STATIC)
54c1e4
		@echo DISABLE_FRONTEND:'       '$(DISABLE_FRONTEND)
a8ab0d
		@echo DISABLE_SHARED:'         '$(DISABLE_SHARED)
a8ab0d
		@echo DISABLE_STATIC:'         '$(DISABLE_STATIC)
3d5a30
		@echo
3d5a30
		@echo USE_CUSTOM_CFGDEFS:'     '$(USE_CUSTOM_CFGDEFS)
3d5a30
		@echo USE_CUSTOM_USRDEFS:'     '$(USE_CUSTOM_USRDEFS)
a8ab0d
8b12e5
.display-host:
8b12e5
		@$(CC) $(CFLAGS) -dumpmachine
8b12e5
5651ec
.display-cc:
5651ec
		@echo $(CC)
5651ec
7ec026
.display-cflags:
7ec026
		@echo $(CFLAGS)
7ec026
f46039
1ab21d
.PHONY:		package-app \
c2225d
		all install shared static app \
b2d0f4
		shared-objs shared-lib \
832c05
		shared-soname shared-solink \
832c05
		package-shared-soname package-shared-solink \
f46039
		static-objs static-lib \
f46039
		default-app shared-app static-app \
b2d0f4
		install-shared install-static \
832c05
		install-soname install-solink \
832c05
		package-install-soname package-install-solink \
f46039
		install-headers install-app \
b9a8a2
		install-headers-default install-headers-custom \
b2d0f4
		clean distclean clean-implib version \
0bf5e7
		.display .conf \
40b609
		.display-project .display-env .display-tools .display-flags \
b2c8fb
		.display-pe .display-dirs .display-build \
b2d0f4
		implib implib-ver implib-soname implib-solink \
b2d0f4
		install-implib install-implib-ver \
b2d0f4
		install-implib-soname install-implib-solink