Blame Makefile.in

52d60d
PACKAGE 		= @package@
5b49a6
NICKNAME 		= @nickname@
52d60d
PROJECT_DIR 		= @project_dir@
7b4710
SOURCE_DIR 		= @source_dir@
00e0cd
GIT_REFERENCE_INDEX	= @git_reference_index@
5b49a6
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
5b49a6
AVOID_VERSION		= @avoid_version@
52d60d
a4c3b9
PKGNAME			= @pkgname@
a4c3b9
PKGDESC			= @pkgdesc@
a4c3b9
PKGUSRC			= @pkgusrc@
a4c3b9
PKGREPO			= @pkgrepo@
a4c3b9
PKGPSRC			= @pkgpsrc@
a4c3b9
PKGDURL			= @pkgdurl@
a4c3b9
PKGDEFS			= @pkgdefs@
a4c3b9
PKGLIBS			= @pkglibs@
a4c3b9
52d60d
BUILD 			= @build@
52d60d
HOST 			= @host@
927e2d
CCHOST 			= @cchost@
1b579f
CFGHOST 		= @cfghost@
52d60d
TARGET 			= @target@
52d60d
ARCH 			= @arch@
220bb3
COMPILER 		= @compiler@
2c5c40
TOOLCHAIN		= @toolchain@
52d60d
SYSROOT 		= @sysroot@
52d60d
CROSS_COMPILE 		= @cross_compile@
52d60d
SHELL 			= @shell@
52d60d
5ba53c
PREFIX 			= @prefix@
5ba53c
EXEC_PREFIX 		= @exec_prefix@
5ba53c
BINDIR 			= @bindir@
5ba53c
SBINDIR 		= @sbindir@
5ba53c
LIBDIR 			= @libdir@
5ba53c
INCLUDEDIR 		= @includedir@
5ba53c
OLDINCLUDEDIR 		= @oldincludedir@
5ba53c
MANDIR 			= @mandir@
5ba53c
DOCDIR 			= @docdir@
5ba53c
LIBEXECDIR 		= @libexecdir@
5ba53c
5ba53c
SYSCONFDIR		= @sysconfdir@
5ba53c
SHAREDSTATEDIR		= @sharedstatedir@
5ba53c
LOCALSTATEDIR		= @localstatedir@
5ba53c
RUNSTATEDIR		= @runstatedir@
5ba53c
DATAROOTDIR		= @datarootdir@
5ba53c
DATADIR			= @datadir@
5ba53c
INFODIR			= @infodir@
5ba53c
LOCALEDIR		= @localedir@
5ba53c
HTMLDIR			= @htmldir@
5ba53c
DVIDIR			= @dvidir@
5ba53c
PDFDIR			= @pdfdir@
5ba53c
PSDIR			= @psdir@
5ba53c
1a1e15
CFLAGS_COMMON 		+= @cflags_common@
1a1e15
CFLAGS_DEBUG 		+= @cflags_debug@
1a1e15
CFLAGS_CMDLINE 		+= @cflags_cmdline@
1a1e15
CFLAGS_CONFIG 		+= @cflags_config@
1a1e15
CFLAGS_SYSROOT 		+= @cflags_sysroot@
1a1e15
CFLAGS_OS		+= @cflags_os@
1a1e15
CFLAGS_SITE		+= @cflags_site@
1a1e15
CFLAGS_PATH 		+= @cflags_path@
1a1e15
CFLAGS_STRICT 		+= @cflags_strict@
1a1e15
CFLAGS_UTIL 		+= @cflags_util@
1a1e15
CFLAGS_LAST 		+= @cflags_last@
1a1e15
CFLAGS_ONCE 		+= @cflags_once@
1a1e15
1a1e15
LDFLAGS_COMMON 		+= @ldflags_common@
1a1e15
LDFLAGS_DEBUG 		+= @ldflags_debug@
1a1e15
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
1a1e15
LDFLAGS_CONFIG 		+= @ldflags_config@
1a1e15
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
1a1e15
LDFLAGS_PATH 		+= @ldflags_path@
1a1e15
LDFLAGS_STRICT 		+= @ldflags_strict@
1a1e15
LDFLAGS_UTIL 		+= @ldflags_util@
1a1e15
LDFLAGS_LAST 		+= @ldflags_last@
1a1e15
LDFLAGS_ONCE 		+= @ldflags_once@
52d60d
5ba53c
USER_CC                 = @user_cc@
5ba53c
USER_CPP                = @user_cpp@
5ba53c
USER_CXX                = @user_cxx@
5ba53c
1a1e15
NATIVE_HOST		= @native_host@
1a1e15
NATIVE_CFGHOST		= @native_cfghost@
1a1e15
NATIVE_CFLAGS		= @native_cflags@
1a1e15
NATIVE_LDFLAGS		= @native_ldflags@
52d60d
5b49a6
ALL_SHARED              = @all_shared@
5b49a6
ALL_STATIC              = @all_static@
5b49a6
DISABLE_FRONTEND	= @disable_frontend@
5b49a6
DISABLE_SHARED          = @disable_shared@
5b49a6
DISABLE_STATIC          = @disable_static@
52d60d
c9d763
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
c9d763
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
c9d763
45aa29
.SUFFIXES:
45aa29
52d60d
all:
52d60d
install:
52d60d
shared:
52d60d
static:
52d60d
5b49a6
install-extras:
5b49a6
install-app-extras:
52d60d
1a1e15
include ./ccenv/host.mk
1a1e15
include ./ccenv/native.mk
52d60d
1e924c
include ./cfgdefs.mk
1e924c
include ./usrdefs.mk
5be1cf
d0476e
include $(PROJECT_DIR)/sofort/core/defs.mk
d0476e
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
d0476e
include $(PROJECT_DIR)/sofort/core/version.mk
d0476e
include $(PROJECT_DIR)/sofort/core/flavor.mk
5b49a6
1e924c
include $(PROJECT_DIR)/project/osforce.mk
52d60d
include $(PROJECT_DIR)/project/tree.mk
52d60d
include $(PROJECT_DIR)/project/depends.mk
52d60d
include $(PROJECT_DIR)/project/headers.mk
52d60d
include $(PROJECT_DIR)/project/common.mk
52d60d
include $(PROJECT_DIR)/project/arch.mk
52d60d
include $(PROJECT_DIR)/project/extras.mk
52d60d
include $(PROJECT_DIR)/project/overrides.mk
52d60d
52d60d
5b49a6
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
5b49a6
7b4710
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
52d60d
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
52d60d
7b4710
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
52d60d
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
52d60d
dcb5ae
lib/%$(OS_LIB_PREFIXED_SUFFIX)$(VER_XYZ)$(OS_LIB_SUFFIXED_SUFFIX):
5b49a6
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
52d60d
247174
lib/%$(OS_ARCHIVE_EXT):
247174
		mkdir -p lib
52d60d
		rm -f $@
0b08f3
		$(AR) rcs $@ $^
52d60d
52d60d
52d60d
5b49a6
all:		package-shared package-static app
5b49a6
5b49a6
install:	package-install-app
5b49a6
install:	package-install-extras
5b49a6
install:	install-libs
52d60d
5b49a6
app:		app-tag
52d60d
5b49a6
app.tag:
5b49a6
		cp $(PACKAGE_APP) $(APP)
5b49a6
		touch app.tag
52d60d
5b49a6
install-libs:	package-install-shared
5b49a6
install-libs:	package-install-static
52d60d
5b49a6
install-headers-default:
2d45c9
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
2d45c9
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
52d60d
5b49a6
install-shared:	shared install-lib install-implib
5b49a6
install-shared: package-install-soname package-install-solink
5b49a6
install-shared: install-headers
5b49a6
5b49a6
install-lib:	shared
2d45c9
		mkdir -p $(DESTDIR)$(LIBDIR)
2d45c9
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
52d60d
5b49a6
install-static:	static install-headers
2d45c9
		mkdir -p $(DESTDIR)$(LIBDIR)
2d45c9
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
52d60d
5b49a6
install-app:	app install-app-extras
5b49a6
		mkdir -p $(DESTDIR)$(BINDIR)
5b49a6
		cp $(APP) $(DESTDIR)$(BINDIR)
5b49a6
5b49a6
install-static-app:	static-app install-app-extras
5b49a6
			mkdir -p $(DESTDIR)$(BINDIR)
5b49a6
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
52d60d
52d60d
5b49a6
5b49a6
shared:		shared-lib implib
5b49a6
shared:		package-shared-soname package-shared-solink
52d60d
52d60d
static:		static-lib
52d60d
52d60d
shared-lib:	shared-objs $(SHARED_LIB)
52d60d
5b49a6
shared-soname:	shared-lib $(SHARED_SONAME)
5b49a6
5b49a6
shared-solink:	shared-lib $(SHARED_SOLINK)
5b49a6
52d60d
static-lib:	static-objs $(STATIC_LIB)
52d60d
5b49a6
5b49a6
5b49a6
default-app:	version.tag static-objs $(DEFAULT_APP)
5b49a6
5b49a6
shared-app:	version.tag shared $(SHARED_APP)
5b49a6
5b49a6
static-app:	version.tag static-objs $(STATIC_APP)
52d60d
52d60d
52d60d
52d60d
shared-objs:	dirs $(SHARED_OBJS)
52d60d
52d60d
static-objs:	dirs $(STATIC_OBJS)
52d60d
5b49a6
app-objs:	dirs $(APP_OBJS)
5b49a6
52d60d
52d60d
52d60d
$(SHARED_LIB):	$(SHARED_OBJS)
48c55c
$(SHARED_LIB):	LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)
52d60d
52d60d
$(STATIC_LIB):	$(STATIC_OBJS)
52d60d
5b49a6
$(APP):		$(PACKAGE_APP)
5b49a6
5b49a6
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
5b49a6
		rm -f app.tag
5b49a6
		$(CC) -o $@ $^ $(LDFLAGS_APP)
52d60d
590478
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
5b49a6
		rm -f app.tag
b9047c
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
5b49a6
5b49a6
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
5b49a6
		rm -f app.tag
5b49a6
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
5b49a6
5b49a6
5b49a6
dirs: 		dirs.tag
52d60d
52d60d
dirs.tag:
01f474
		mkdir -p build
5b49a6
		mkdir -p bin
6bc15a
		mkdir -p lib
52d60d
		touch dirs.tag
52d60d
52d60d
host.tag:	Makefile
c0640c
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
c0640c
		mv host.tmp host.tag
cac339
01f474
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
d0476e
		$(PROJECT_DIR)/sofort/tools/version.sh	\
7b4710
			-s $(SOURCE_DIR)		\
5b49a6
			-o build/$(PACKAGE)_version.h	\
5b49a6
			-p $(PACKAGE)
5b49a6
		touch version.tag
5b49a6
52d60d
distclean:	clean
570be3
		rm -f ccenv/host.mk
570be3
		rm -f ccenv/native.mk
13bd8b
		rm -f cfgdefs.mk
13bd8b
		rm -f usrdefs.mk
e119f1
		rm -f config.log
52d60d
		rm -f Makefile
a8154e
		rmdir build ccenv bin lib 2>&1 || true
52d60d
5b49a6
clean:		clean-implib
52d60d
		rm -f tree.tag
52d60d
		rm -f dirs.tag
52d60d
		rm -f host.tag
c0640c
		rm -f host.tmp
5b49a6
		rm -f version.tag
5b49a6
		rm -f app.tag
52d60d
		rm -f $(SHARED_OBJS)
52d60d
		rm -f $(STATIC_OBJS)
5b49a6
		rm -f $(APP_OBJS)
52d60d
		rm -f $(SHARED_LIB)
5b49a6
		rm -f $(SHARED_SONAME)
5b49a6
		rm -f $(SHARED_SOLINK)
52d60d
		rm -f $(STATIC_LIB)
5b49a6
		rm -f $(APP)
5b49a6
		rm -f $(DEFAULT_APP)
5b49a6
		rm -f $(SHARED_APP)
5b49a6
		rm -f $(STATIC_APP)
ac38fe
		rm -f build/$(PACKAGE)_version.h
ac38fe
		rm -f build/$(PACKAGE).pc
52d60d
52d60d
75f1da
.display:	.display-project .display-pkgconf .display-env \
75f1da
		.display-tools   .display-flags                \
75f1da
		.display-dirs    .display-build                \
75f1da
		.display-config
5b49a6
5b49a6
.conf:		PAGER ?= less
5b49a6
.conf:
5b49a6
		$(MAKE) .display | $(PAGER)
52d60d
c0640c
.PHONY:		package-app \
927e2d
		all install shared static app \
5b49a6
		shared-objs shared-lib \
5b49a6
		shared-soname shared-solink \
5b49a6
		package-shared-soname package-shared-solink \
52d60d
		static-objs static-lib \
5b49a6
		default-app shared-app static-app \
5b49a6
		install-shared install-static \
5b49a6
		install-soname install-solink \
5b49a6
		package-install-soname package-install-solink \
5b49a6
		install-headers install-app \
5b49a6
		install-headers-default install-headers-custom \
5b49a6
		clean distclean clean-implib version \
5b49a6
		.display .conf \
d71390
		.display-project .display-env .display-tools .display-flags \
09eb64
		.display-pe .display-dirs .display-build \
5b49a6
		implib implib-ver implib-soname implib-solink \
5b49a6
		install-implib install-implib-ver \
5b49a6
		install-implib-soname install-implib-solink