Blame Makefile.in

8be377
PACKAGE 		= @package@
8be377
NICKNAME 		= @nickname@
8be377
PROJECT_DIR 		= @project_dir@
8be377
SOURCE_DIR 		= @source_dir@
8be377
GIT_REFERENCE_INDEX	= @git_reference_index@
8be377
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
8be377
AVOID_VERSION		= @avoid_version@
8be377
207792
PKGNAME			= @pkgname@
207792
PKGDESC			= @pkgdesc@
207792
PKGUSRC			= @pkgusrc@
207792
PKGREPO			= @pkgrepo@
207792
PKGPSRC			= @pkgpsrc@
207792
PKGDURL			= @pkgdurl@
207792
PKGDEFS			= @pkgdefs@
207792
PKGLIBS			= @pkglibs@
207792
8be377
BUILD 			= @build@
8be377
HOST 			= @host@
96c245
CCHOST 			= @cchost@
4d6b80
CFGHOST 		= @cfghost@
8be377
TARGET 			= @target@
8be377
ARCH 			= @arch@
8be377
COMPILER 		= @compiler@
8be377
TOOLCHAIN		= @toolchain@
8be377
SYSROOT 		= @sysroot@
8be377
CROSS_COMPILE 		= @cross_compile@
8be377
SHELL 			= @shell@
8be377
f94a05
PREFIX 			= @prefix@
f94a05
EXEC_PREFIX 		= @exec_prefix@
f94a05
BINDIR 			= @bindir@
f94a05
SBINDIR 		= @sbindir@
f94a05
LIBDIR 			= @libdir@
f94a05
INCLUDEDIR 		= @includedir@
f94a05
OLDINCLUDEDIR 		= @oldincludedir@
f94a05
MANDIR 			= @mandir@
f94a05
DOCDIR 			= @docdir@
f94a05
LIBEXECDIR 		= @libexecdir@
f94a05
f94a05
SYSCONFDIR		= @sysconfdir@
f94a05
SHAREDSTATEDIR		= @sharedstatedir@
f94a05
LOCALSTATEDIR		= @localstatedir@
f94a05
RUNSTATEDIR		= @runstatedir@
f94a05
DATAROOTDIR		= @datarootdir@
f94a05
DATADIR			= @datadir@
f94a05
INFODIR			= @infodir@
f94a05
LOCALEDIR		= @localedir@
f94a05
HTMLDIR			= @htmldir@
f94a05
DVIDIR			= @dvidir@
f94a05
PDFDIR			= @pdfdir@
f94a05
PSDIR			= @psdir@
f94a05
8da6b5
CFLAGS_COMMON 		+= @cflags_common@
8da6b5
CFLAGS_DEBUG 		+= @cflags_debug@
8da6b5
CFLAGS_CMDLINE 		+= @cflags_cmdline@
8da6b5
CFLAGS_CONFIG 		+= @cflags_config@
8da6b5
CFLAGS_SYSROOT 		+= @cflags_sysroot@
8da6b5
CFLAGS_OS		+= @cflags_os@
8da6b5
CFLAGS_SITE		+= @cflags_site@
8da6b5
CFLAGS_PATH 		+= @cflags_path@
8da6b5
CFLAGS_STRICT 		+= @cflags_strict@
8da6b5
CFLAGS_UTIL 		+= @cflags_util@
8da6b5
CFLAGS_LAST 		+= @cflags_last@
8da6b5
CFLAGS_ONCE 		+= @cflags_once@
8da6b5
8da6b5
LDFLAGS_COMMON 		+= @ldflags_common@
8da6b5
LDFLAGS_DEBUG 		+= @ldflags_debug@
8da6b5
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
8da6b5
LDFLAGS_CONFIG 		+= @ldflags_config@
8da6b5
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
8da6b5
LDFLAGS_PATH 		+= @ldflags_path@
8da6b5
LDFLAGS_STRICT 		+= @ldflags_strict@
8da6b5
LDFLAGS_UTIL 		+= @ldflags_util@
8da6b5
LDFLAGS_LAST 		+= @ldflags_last@
8da6b5
LDFLAGS_ONCE 		+= @ldflags_once@
8be377
f94a05
USER_CC                 = @user_cc@
f94a05
USER_CPP                = @user_cpp@
f94a05
USER_CXX                = @user_cxx@
f94a05
8da6b5
NATIVE_HOST		= @native_host@
8da6b5
NATIVE_CFGHOST		= @native_cfghost@
8da6b5
NATIVE_CFLAGS		= @native_cflags@
8da6b5
NATIVE_LDFLAGS		= @native_ldflags@
8be377
8be377
ALL_SHARED              = @all_shared@
8be377
ALL_STATIC              = @all_static@
8be377
DISABLE_FRONTEND	= @disable_frontend@
8be377
DISABLE_SHARED          = @disable_shared@
8be377
DISABLE_STATIC          = @disable_static@
8be377
c0944c
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
c0944c
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
c0944c
9e9df5
.SUFFIXES:
9e9df5
8be377
all:
8be377
install:
8be377
shared:
8be377
static:
8be377
8be377
install-extras:
8be377
install-app-extras:
8be377
8da6b5
include ./ccenv/host.mk
8da6b5
include ./ccenv/native.mk
8be377
dff687
include ./cfgdefs.mk
dff687
include ./usrdefs.mk
8be377
11d31d
include $(PROJECT_DIR)/sofort/core/defs.mk
11d31d
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
11d31d
include $(PROJECT_DIR)/sofort/core/version.mk
11d31d
include $(PROJECT_DIR)/sofort/core/flavor.mk
8be377
dff687
include $(PROJECT_DIR)/project/osforce.mk
8be377
include $(PROJECT_DIR)/project/tree.mk
8be377
include $(PROJECT_DIR)/project/depends.mk
8be377
include $(PROJECT_DIR)/project/headers.mk
8be377
include $(PROJECT_DIR)/project/common.mk
8be377
include $(PROJECT_DIR)/project/arch.mk
8be377
include $(PROJECT_DIR)/project/extras.mk
8be377
include $(PROJECT_DIR)/project/overrides.mk
8be377
8be377
8be377
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
8be377
8be377
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
8be377
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
8be377
8be377
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
8be377
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
8be377
aea5c6
lib/%$(OS_LIB_PREFIXED_SUFFIX)$(VER_XYZ)$(OS_LIB_SUFFIXED_SUFFIX):
8be377
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
8be377
08afec
lib/%$(OS_ARCHIVE_EXT):
08afec
		mkdir -p lib
8be377
		rm -f $@
8be377
		$(AR) rcs $@ $^
8be377
8be377
8be377
8be377
all:		package-shared package-static app
8be377
8be377
install:	package-install-app
8be377
install:	package-install-extras
8be377
install:	install-libs
8be377
8be377
app:		app-tag
8be377
8be377
app.tag:
8be377
		cp $(PACKAGE_APP) $(APP)
8be377
		touch app.tag
8be377
8be377
install-libs:	package-install-shared
8be377
install-libs:	package-install-static
8be377
8be377
install-headers-default:
8be377
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
8be377
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
8be377
8be377
install-shared:	shared install-lib install-implib
8be377
install-shared: package-install-soname package-install-solink
8be377
install-shared: install-headers
8be377
8be377
install-lib:	shared
8be377
		mkdir -p $(DESTDIR)$(LIBDIR)
8be377
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
8be377
8be377
install-static:	static install-headers
8be377
		mkdir -p $(DESTDIR)$(LIBDIR)
8be377
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
8be377
8be377
install-app:	app install-app-extras
8be377
		mkdir -p $(DESTDIR)$(BINDIR)
8be377
		cp $(APP) $(DESTDIR)$(BINDIR)
8be377
8be377
install-static-app:	static-app install-app-extras
8be377
			mkdir -p $(DESTDIR)$(BINDIR)
8be377
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
8be377
8be377
8be377
8be377
shared:		shared-lib implib
8be377
shared:		package-shared-soname package-shared-solink
8be377
8be377
static:		static-lib
8be377
8be377
shared-lib:	shared-objs $(SHARED_LIB)
8be377
8be377
shared-soname:	shared-lib $(SHARED_SONAME)
8be377
8be377
shared-solink:	shared-lib $(SHARED_SOLINK)
8be377
8be377
static-lib:	static-objs $(STATIC_LIB)
8be377
8be377
8be377
8be377
default-app:	version.tag static-objs $(DEFAULT_APP)
8be377
8be377
shared-app:	version.tag shared $(SHARED_APP)
8be377
8be377
static-app:	version.tag static-objs $(STATIC_APP)
8be377
8be377
8be377
8be377
shared-objs:	dirs $(SHARED_OBJS)
8be377
8be377
static-objs:	dirs $(STATIC_OBJS)
8be377
8be377
app-objs:	dirs $(APP_OBJS)
8be377
8be377
8be377
8be377
$(SHARED_LIB):	$(SHARED_OBJS)
f4059d
$(SHARED_LIB):	LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)
8be377
8be377
$(STATIC_LIB):	$(STATIC_OBJS)
8be377
8be377
$(APP):		$(PACKAGE_APP)
8be377
8be377
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
8be377
		rm -f app.tag
8be377
		$(CC) -o $@ $^ $(LDFLAGS_APP)
8be377
c7f7bb
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
8be377
		rm -f app.tag
ab22f0
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
8be377
8be377
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
8be377
		rm -f app.tag
8be377
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
8be377
8be377
8be377
dirs: 		dirs.tag
8be377
8be377
dirs.tag:
cb2633
		mkdir -p build
8be377
		mkdir -p bin
8be377
		mkdir -p lib
8be377
		touch dirs.tag
8be377
8be377
host.tag:	Makefile
6b54af
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
6b54af
		mv host.tmp host.tag
27a0fe
cb2633
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
11d31d
		$(PROJECT_DIR)/sofort/tools/version.sh	\
8be377
			-s $(SOURCE_DIR)		\
8be377
			-o build/$(PACKAGE)_version.h	\
8be377
			-p $(PACKAGE)
8be377
		touch version.tag
8be377
8be377
distclean:	clean
a98706
		rm -f ccenv/host.mk
a98706
		rm -f ccenv/native.mk
251401
		rm -f cfgdefs.mk
251401
		rm -f usrdefs.mk
fb9a9c
		rm -f config.log
8be377
		rm -f Makefile
e65d1b
		rmdir build ccenv bin lib 2>&1 || true
8be377
8be377
clean:		clean-implib
8be377
		rm -f tree.tag
8be377
		rm -f dirs.tag
8be377
		rm -f host.tag
6b54af
		rm -f host.tmp
8be377
		rm -f version.tag
8be377
		rm -f app.tag
8be377
		rm -f $(SHARED_OBJS)
8be377
		rm -f $(STATIC_OBJS)
8be377
		rm -f $(APP_OBJS)
8be377
		rm -f $(SHARED_LIB)
8be377
		rm -f $(SHARED_SONAME)
8be377
		rm -f $(SHARED_SOLINK)
8be377
		rm -f $(STATIC_LIB)
8be377
		rm -f $(APP)
8be377
		rm -f $(DEFAULT_APP)
8be377
		rm -f $(SHARED_APP)
8be377
		rm -f $(STATIC_APP)
e54718
		rm -f build/$(PACKAGE)_version.h
e54718
		rm -f build/$(PACKAGE).pc
8be377
8be377
a40e0a
.display:	.display-project .display-pkgconf .display-env \
a40e0a
		.display-tools   .display-flags                \
a40e0a
		.display-dirs    .display-build                \
a40e0a
		.display-config
8be377
8be377
.conf:		PAGER ?= less
8be377
.conf:
8be377
		$(MAKE) .display | $(PAGER)
8be377
6b54af
.PHONY:		package-app \
96c245
		all install shared static app \
8be377
		shared-objs shared-lib \
8be377
		shared-soname shared-solink \
8be377
		package-shared-soname package-shared-solink \
8be377
		static-objs static-lib \
8be377
		default-app shared-app static-app \
8be377
		install-shared install-static \
8be377
		install-soname install-solink \
8be377
		package-install-soname package-install-solink \
8be377
		install-headers install-app \
8be377
		install-headers-default install-headers-custom \
8be377
		clean distclean clean-implib version \
8be377
		.display .conf \
8be377
		.display-project .display-env .display-tools .display-flags \
7cdf93
		.display-pe .display-dirs .display-build \
8be377
		implib implib-ver implib-soname implib-solink \
8be377
		install-implib install-implib-ver \
8be377
		install-implib-soname install-implib-solink