Redfoxmoon / cross / slibtool

Forked from cross/slibtool 10 months ago
Clone

Blame Makefile.in

9ca8c4
PACKAGE 		= @package@
9ca8c4
PROJECT_DIR 		= @project_dir@
9ca8c4
9ca8c4
BUILD 			= @build@
9ca8c4
HOST 			= @host@
9ca8c4
TARGET 			= @target@
9ca8c4
ARCH 			= @arch@
9ca8c4
COMPILER 		= @compiler@
9ca8c4
TOOLCHAIN		= @toolchain@
9ca8c4
SYSROOT 		= @sysroot@
9ca8c4
CROSS_COMPILE 		= @cross_compile@
9ca8c4
SHELL 			= @shell@
9ca8c4
9ca8c4
CFLAGS_DEBUG 		= @cflags_debug@
9ca8c4
CFLAGS_COMMON 		= @cflags_common@
9ca8c4
CFLAGS_CMDLINE 		= @cflags_cmdline@
9ca8c4
CFLAGS_CONFIG 		= @cflags_config@
9ca8c4
CFLAGS_SYSROOT 		= @cflags_sysroot@
9ca8c4
CFLAGS_OS		= @cflags_os@
9ca8c4
CFLAGS_SITE		= @cflags_site@
9ca8c4
CFLAGS_PATH 		= @cflags_path@
9ca8c4
9ca8c4
LDFLAGS_DEBUG 		= @ldflags_debug@
9ca8c4
LDFLAGS_COMMON 		= @ldflags_common@
9ca8c4
LDFLAGS_CMDLINE 	= @ldflags_cmdline@
9ca8c4
LDFLAGS_CONFIG 		= @ldflags_config@
9ca8c4
LDFLAGS_SYSROOT 	= @ldflags_sysroot@
9ca8c4
LDFLAGS_PATH 		= @ldflags_path@
9ca8c4
9ca8c4
PE_SUBSYSTEM 		= @pe_subsystem@
9ca8c4
PE_IMAGE_BASE 		= @pe_image_base@
9ca8c4
PE_CONFIG_DEFS  	= @pe_config_defs@
9ca8c4
9ca8c4
ELF_EH_FRAME 		= @elf_eh_frame@
9ca8c4
ELF_HASH_STYLE 		= @elf_hash_style@
9ca8c4
ELF_CONFIG_DEFS 	= @elf_config_defs@
9ca8c4
9ca8c4
PREFIX 			= @prefix@
9ca8c4
BINDIR 			= @bindir@
9ca8c4
LIBDIR 			= @libdir@
9ca8c4
INCLUDEDIR 		= @includedir@
9ca8c4
SYSLIBDIR 		= @syslibdir@
9ca8c4
MANDIR 			= @mandir@
9ca8c4
DOCDIR 			= @docdir@
9ca8c4
LIBEXECDIR 		= @libexecdir@
9ca8c4
9ca8c4
NATIVE_CC 		= @native_cc@
9ca8c4
NATIVE_OS 		= @native_os@
9ca8c4
NATIVE_OS_BITS 		= @native_os_bits@
9ca8c4
NATIVE_OS_UNDERSCORE	= @native_os_underscore@
9ca8c4
9ca8c4
USER_CC                 = @user_cc@
9ca8c4
USER_CPP                = @user_cpp@
9ca8c4
USER_CXX                = @user_cxx@
9ca8c4
9ca8c4
9ca8c4
all:
9ca8c4
install:
9ca8c4
shared:
9ca8c4
static:
9ca8c4
9ca8c4
9ca8c4
9ca8c4
include $(PROJECT_DIR)/sysinfo/host/$(HOST).mk
9ca8c4
include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk
9ca8c4
include $(PROJECT_DIR)/sysinfo/toolchain/$(TOOLCHAIN).mk
9ca8c4
9ca8c4
include $(PROJECT_DIR)/project/defs.mk
9ca8c4
include $(PROJECT_DIR)/project/tree.mk
9ca8c4
include $(PROJECT_DIR)/project/depends.mk
9ca8c4
include $(PROJECT_DIR)/project/headers.mk
9ca8c4
include $(PROJECT_DIR)/project/common.mk
9ca8c4
include $(PROJECT_DIR)/project/arch.mk
9ca8c4
include $(PROJECT_DIR)/project/extras.mk
9ca8c4
include $(PROJECT_DIR)/project/overrides.mk
9ca8c4
9ca8c4
9ca8c4
9ca8c4
$(APP_SRCS:%.c=%.o): version.tag
9ca8c4
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
9ca8c4
9ca8c4
src/%.lo: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
9ca8c4
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
9ca8c4
9ca8c4
src/%.o: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
9ca8c4
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
9ca8c4
9ca8c4
$(LIBDIR)/%$(OS_LIB_SUFFIX):
9ca8c4
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
9ca8c4
9ca8c4
$(LIBDIR)/%$(OS_ARCHIVE_EXT):
9ca8c4
		rm -f $@
9ca8c4
		$(AR) rcs $@ $^
9ca8c4
9ca8c4
9ca8c4
9ca8c4
all:		shared static app
9ca8c4
9ca8c4
install:	install-libs install-headers install-app
9ca8c4
9ca8c4
app:		default-app
9ca8c4
9ca8c4
9ca8c4
install-libs:	install-shared install-static install-implib
9ca8c4
9ca8c4
install-headers:shared static
9ca8c4
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)
9ca8c4
		cp $(API_HEADERS) $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)
9ca8c4
9ca8c4
install-shared:	shared install-implib
9ca8c4
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(LIBDIR)
9ca8c4
		cp $(SHARED_LIB) $(DESTDIR)///./$(PREFIX)/./$(LIBDIR)
9ca8c4
9ca8c4
install-static:	static
9ca8c4
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(LIBDIR)
9ca8c4
		cp $(STATIC_LIB) $(DESTDIR)///./$(PREFIX)/./$(LIBDIR)
9ca8c4
9ca8c4
install-app:	app
9ca8c4
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(BINDIR)
9ca8c4
		cp $(APP) $(DESTDIR)///./$(PREFIX)/./$(BINDIR)
9ca8c4
9ca8c4
9ca8c4
9ca8c4
shared:		shared-lib shared-implib
9ca8c4
9ca8c4
static:		static-lib
9ca8c4
9ca8c4
shared-lib:	shared-objs $(SHARED_LIB)
9ca8c4
9ca8c4
static-lib:	static-objs $(STATIC_LIB)
9ca8c4
9ca8c4
shared-implib:	shared-lib
9ca8c4
9ca8c4
9ca8c4
9ca8c4
default-app:	version.tag static $(DEFAULT_APP) $(APP)
9ca8c4
9ca8c4
shared-app:	version.tag shared $(SHARED_APP)
9ca8c4
9ca8c4
static-app:	version.tag static $(STATIC_APP)
9ca8c4
9ca8c4
9ca8c4
9ca8c4
shared-objs:	dirs $(SHARED_OBJS)
9ca8c4
9ca8c4
static-objs:	dirs $(STATIC_OBJS)
9ca8c4
9ca8c4
app-objs:	dirs $(APP_OBJS)
9ca8c4
9ca8c4
9ca8c4
9ca8c4
$(SHARED_LIB):	$(SHARED_OBJS)
9ca8c4
9ca8c4
$(STATIC_LIB):	$(STATIC_OBJS)
9ca8c4
9ca8c4
$(APP):		$(DEFAULT_APP)
9ca8c4
		cp $^ $@
9ca8c4
9ca8c4
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
9ca8c4
		$(CC) -o $@ $^ $(LDFLAGS_APP)
9ca8c4
9ca8c4
$(SHARED_APP):	$(SHARED_LIB) $(APP_OBJS)
9ca8c4
		$(CC) -o $@ $(APP_OBJS) -l$(PACKAGE) $(LDFLAGS_SHARED)
9ca8c4
9ca8c4
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
9ca8c4
		$(CC) -static -o $@ $^ -l$(PACKAGE) $(LDFLAGS_STATIC)
9ca8c4
9ca8c4
9ca8c4
dirs: 		dirs.tag tree.tag
9ca8c4
9ca8c4
dirs.tag:
9ca8c4
		mkdir -p $(BINDIR)
9ca8c4
		mkdir -p $(LIBDIR)
9ca8c4
		touch dirs.tag
9ca8c4
9ca8c4
host.tag:	Makefile
9ca8c4
		$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
9ca8c4
		touch host.tag
9ca8c4
9ca8c4
version.tag:
9ca8c4
		$(PROJECT_DIR)/sysinfo/version.sh	\
9ca8c4
			-s $(PROJECT_DIR)		\
9ca8c4
			-o build/$(PACKAGE)_version.h	\
9ca8c4
			-p $(PACKAGE)
9ca8c4
		touch version.tag
9ca8c4
9ca8c4
distclean:	clean
9ca8c4
		rm -f Makefile
9ca8c4
9ca8c4
clean:
9ca8c4
		rm -f tree.tag
9ca8c4
		rm -f dirs.tag
9ca8c4
		rm -f host.tag
9ca8c4
		rm -f version.tag
9ca8c4
		rm -f $(SHARED_OBJS)
9ca8c4
		rm -f $(STATIC_OBJS)
9ca8c4
		rm -f $(APP_OBJS)
9ca8c4
		rm -f $(SHARED_LIB)
9ca8c4
		rm -f $(STATIC_LIB)
9ca8c4
		rm -f $(SHARED_IMPLIB)
9ca8c4
		rm -f $(APP)
9ca8c4
		rm -f $(DEFAULT_APP)
9ca8c4
		rm -f $(SHARED_APP)
9ca8c4
		rm -f $(STATIC_APP)
9ca8c4
9ca8c4
9ca8c4
.display:	.display-project .display-env .display-tools .display-flags \
9ca8c4
		.display-pe .display-elf .display-dirs .display-build
9ca8c4
9ca8c4
.display-project:
9ca8c4
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
9ca8c4
		@echo BUILD_DIR:'              '$(CURDIR)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-env:
9ca8c4
		@echo BUILD:'                  '$(BUILD)
9ca8c4
		@echo HOST:'                   '$(HOST)
9ca8c4
		@echo TARGET:'                 '$(TARGET)
9ca8c4
		@echo ARCH:'                   '$(ARCH)
9ca8c4
		@echo COMPILER:'               '$(COMPILER)
9ca8c4
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
9ca8c4
		@echo SYSROOT:'                '$(SYSROOT)
9ca8c4
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
9ca8c4
		@echo SHELL:'                  '$(SHELL)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-tools:
9ca8c4
		@echo CC:'                     '$(CC)
9ca8c4
		@echo CPP:'                    '$(CPP)
9ca8c4
		@echo CXX:'                    '$(CXX)
9ca8c4
		@echo
9ca8c4
		@echo AS:'                     '$(AS)
9ca8c4
		@echo AR:'                     '$(AR)
9ca8c4
		@echo LD:'                     '$(LD)
9ca8c4
		@echo NM:'                     '$(NM)
9ca8c4
		@echo OBJDUMP:'                '$(OBJDUMP)
9ca8c4
		@echo RANLIB:'                 '$(RANLIB)
9ca8c4
		@echo SIZE:'                   '$(SIZE)
9ca8c4
		@echo STRIP:'                  '$(STRIP)
9ca8c4
		@echo STRINGS:'                '$(STRINGS)
9ca8c4
		@echo
9ca8c4
		@echo ADDR2LINE:'              '$(ADDR2LINE)
9ca8c4
		@echo COV:'                    '$(COV)
9ca8c4
		@echo CXXFILT'                 '$(CXXFILT)
9ca8c4
		@echo ELFEDIT:'                '$(ELFEDIT)
9ca8c4
		@echo OBJCOPY:'                '$(OBJCOPY)
9ca8c4
		@echo READELF:'                '$(READELF)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-flags:
9ca8c4
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
9ca8c4
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
9ca8c4
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
9ca8c4
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
9ca8c4
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
9ca8c4
		@echo CFLAGS_OS:'              '$(CFLAGS_OS)
9ca8c4
		@echo CFLAGS_SITE:'            '$(CFLAGS_SITE)
9ca8c4
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
9ca8c4
		@echo
9ca8c4
		@echo LDFLAGS_DEBUG:'           '$(LDFLAGS_DEBUG)
9ca8c4
		@echo LDFLAGS_COMMON:'          '$(LDFLAGS_COMMON)
9ca8c4
		@echo LDFLAGS_CMDLINE:'         '$(LDFLAGS_CMDLINE)
9ca8c4
		@echo LDFLAGS_CONFIG:'          '$(LDFLAGS_CONFIG)
9ca8c4
		@echo LDFLAGS_SYSROOT:'         '$(LDFLAGS_SYSROOT)
9ca8c4
		@echo LDFLAGS_PATH:'            '$(LDFLAGS_PATH)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-pe:
9ca8c4
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
9ca8c4
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
9ca8c4
		@echo PE_CONFIG_DEFS:'         '$(PE_CONFIG_DEFS)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-elf:
9ca8c4
		@echo ELF_EH_FRAME:'           '$(ELF_EH_FRAME)
9ca8c4
		@echo ELF_HASH_STYLE:'         '$(ELF_HASH_STYLE)
9ca8c4
		@echo ELF_CONFIG_DEFS:'        '$(ELF_CONFIG_DEFS)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-dirs:
9ca8c4
		@echo PREFIX:'                 '$(PREFIX)
9ca8c4
		@echo BINDIR:'                 '$(BINDIR)
9ca8c4
		@echo LIBDIR:'                 '$(LIBDIR)
9ca8c4
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
9ca8c4
		@echo SYSLIBDIR:'              '$(SYSLIBDIR)
9ca8c4
		@echo MANDIR:'                 '$(MANDIR)
9ca8c4
		@echo DOCDIR:'                 '$(DOCDIR)
9ca8c4
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
9ca8c4
		@echo
9ca8c4
9ca8c4
.display-build:
9ca8c4
		@echo NATIVE_CC:'              '$(NATIVE_CC)
9ca8c4
		@echo NATIVE_OS:'              '$(NATIVE_OS)
9ca8c4
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
9ca8c4
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
9ca8c4
		@echo
9ca8c4
		@echo USER_CC:'                '$(USER_CC)
9ca8c4
		@echo USER_CPP:'               '$(USER_CPP)
9ca8c4
		@echo USER_CXX:'               '$(USER_CXX)
9ca8c4
		@echo
9ca8c4
e43b24
.display-host:
e43b24
		@$(CC) $(CFLAGS) -dumpmachine
e43b24
9ca8c4
9ca8c4
.PHONY:		all install shared static app .display \
9ca8c4
		shared-objs shared-lib shared-implib \
9ca8c4
		static-objs static-lib \
9ca8c4
		default-app shared-app static-app \
9ca8c4
		install-shared install-static install-implib \
9ca8c4
		install-headers install-app \
9ca8c4
		clean distclean version \
9ca8c4
		.display-project .display-env .display-tools .display-flags \
9ca8c4
		.display-pe .display-elf .display-dirs .display-build