Blame Makefile.in

7b83a9
PACKAGE 		= @package@
7b83a9
PROJECT_DIR 		= @project_dir@
7b83a9
7b83a9
BUILD 			= @build@
7b83a9
HOST 			= @host@
7b83a9
TARGET 			= @target@
7b83a9
ARCH 			= @arch@
f97c34
COMPILER 		= @compiler@
651d7b
TOOLCHAIN		= @toolchain@
7b83a9
SYSROOT 		= @sysroot@
7b83a9
CROSS_COMPILE 		= @cross_compile@
7b83a9
SHELL 			= @shell@
7b83a9
7b83a9
CFLAGS_DEBUG 		= @cflags_debug@
7b83a9
CFLAGS_COMMON 		= @cflags_common@
7b83a9
CFLAGS_CMDLINE 		= @cflags_cmdline@
7b83a9
CFLAGS_CONFIG 		= @cflags_config@
7b83a9
CFLAGS_SYSROOT 		= @cflags_sysroot@
7b83a9
CFLAGS_PATH 		= @cflags_path@
7b83a9
7b83a9
LDFLAGS_DEBUG 		= @ldflags_debug@
7b83a9
LDFLAGS_COMMON 		= @ldflags_common@
7b83a9
LDFLAGS_CMDLINE 	= @ldflags_cmdline@
7b83a9
LDFLAGS_CONFIG 		= @ldflags_config@
7b83a9
LDFLAGS_SYSROOT 	= @ldflags_sysroot@
7b83a9
LDFLAGS_PATH 		= @ldflags_path@
7b83a9
7b83a9
PE_SUBSYSTEM 		= @pe_subsystem@
7b83a9
PE_IMAGE_BASE 		= @pe_image_base@
7b83a9
PE_CONFIG_DEFS  	= @pe_config_defs@
7b83a9
7b83a9
ELF_EH_FRAME 		= @elf_eh_frame@
7b83a9
ELF_HASH_STYLE 		= @elf_hash_style@
7b83a9
ELF_CONFIG_DEFS 	= @elf_config_defs@
7b83a9
7b83a9
PREFIX 			= @prefix@
7b83a9
BINDIR 			= @bindir@
7b83a9
LIBDIR 			= @libdir@
7b83a9
INCLUDEDIR 		= @includedir@
7b83a9
SYSLIBDIR 		= @syslibdir@
7b83a9
MANDIR 			= @mandir@
7b83a9
DOCDIR 			= @docdir@
7b83a9
LIBEXECDIR 		= @libexecdir@
7b83a9
7b83a9
NATIVE_CC 		= @native_cc@
7b83a9
NATIVE_OS 		= @native_os@
7b83a9
NATIVE_OS_BITS 		= @native_os_bits@
7b83a9
NATIVE_OS_UNDERSCORE	= @native_os_underscore@
7b83a9
2318d6
USER_CC                 = @user_cc@
2318d6
USER_CPP                = @user_cpp@
2318d6
USER_CXX                = @user_cxx@
7b83a9
7b83a9
7b83a9
all:
7b83a9
install:
7b83a9
shared:
7b83a9
static:
7b83a9
7b83a9
7b83a9
7b83a9
include $(PROJECT_DIR)/sysinfo/host/$(HOST).mk
f97c34
include $(PROJECT_DIR)/sysinfo/compiler/$(COMPILER).mk
651d7b
include $(PROJECT_DIR)/sysinfo/toolchain/$(TOOLCHAIN).mk
7b83a9
7b83a9
include $(PROJECT_DIR)/project/defs.mk
7b83a9
include $(PROJECT_DIR)/project/tree.mk
7b83a9
include $(PROJECT_DIR)/project/depends.mk
7b83a9
include $(PROJECT_DIR)/project/headers.mk
7b83a9
include $(PROJECT_DIR)/project/common.mk
7b83a9
include $(PROJECT_DIR)/project/arch.mk
7b83a9
include $(PROJECT_DIR)/project/extras.mk
7b83a9
include $(PROJECT_DIR)/project/overrides.mk
7b83a9
7b83a9
7b83a9
56e957
src/%.lo: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
7b83a9
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
7b83a9
56e957
src/%.o: 	$(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
7b83a9
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
7b83a9
7b83a9
$(LIBDIR)/%$(OS_LIB_SUFFIX):
7b83a9
		$(LD) -shared -o $@ $^ $(LDFLAGS_SHARED)
7b83a9
7b83a9
$(LIBDIR)/%$(OS_ARCHIVE_EXT):
7b83a9
		rm -f $@
84d36b
		$(AR) rcs $@ $^
7b83a9
7b83a9
7b83a9
7b83a9
all:		shared static
7b83a9
7b83a9
install:	install-libs install-headers
7b83a9
7b83a9
7b83a9
install-libs:	install-shared install-static install-implib
7b83a9
7b83a9
install-headers:shared static
516b69
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)
516b69
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)/bits
516b69
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)/bits/i386
516b69
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)/bits/x86_64
516b69
		cp $(API_HEADERS) $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)
516b69
		cp $(API_HEADERS_BITS) $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)/bits
516b69
		cp $(API_HEADERS_I386) $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)/bits/i386
516b69
		cp $(API_HEADERS_X86_64) $(DESTDIR)///./$(PREFIX)/./$(INCLUDEDIR)/$(PACKAGE)/bits/x86_64
7b83a9
7b83a9
install-shared:	shared install-implib
516b69
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(LIBDIR)
516b69
		cp $(SHARED_LIB) $(DESTDIR)///./$(PREFIX)/./$(LIBDIR)
7b83a9
7b83a9
install-static:	static
516b69
		mkdir -p $(DESTDIR)///./$(PREFIX)/./$(LIBDIR)
516b69
		cp $(STATIC_LIB) $(DESTDIR)///./$(PREFIX)/./$(LIBDIR)
7b83a9
7b83a9
7b83a9
7b83a9
shared:		shared-lib shared-implib
7b83a9
7b83a9
static:		static-lib
7b83a9
7b83a9
shared-lib:	shared-objs $(SHARED_LIB)
7b83a9
7b83a9
static-lib:	static-objs $(STATIC_LIB)
7b83a9
7b83a9
shared-implib:	shared-lib
7b83a9
7b83a9
7b83a9
7b83a9
shared-objs:	dirs $(SHARED_OBJS)
7b83a9
7b83a9
static-objs:	dirs $(STATIC_OBJS)
7b83a9
7b83a9
7b83a9
7b83a9
$(SHARED_LIB):	$(SHARED_OBJS)
7b83a9
7b83a9
$(STATIC_LIB):	$(STATIC_OBJS)
7b83a9
7b83a9
7b83a9
dirs: 		dirs.tag tree.tag
7b83a9
7b83a9
dirs.tag:
7b83a9
		mkdir -p $(LIBDIR)
7b83a9
		touch dirs.tag
7b83a9
7b83a9
host.tag:	Makefile
7b83a9
		$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
7b83a9
		touch host.tag
7b83a9
7b83a9
distclean:	clean
7b83a9
		rm -f Makefile
7b83a9
7b83a9
clean:
7b83a9
		rm -f tree.tag
7b83a9
		rm -f dirs.tag
7b83a9
		rm -f host.tag
7b83a9
		rm -f $(SHARED_OBJS)
7b83a9
		rm -f $(STATIC_OBJS)
7b83a9
		rm -f $(SHARED_LIB)
7b83a9
		rm -f $(STATIC_LIB)
7b83a9
		rm -f $(SHARED_IMPLIB)
7b83a9
7b83a9
31ef73
.display:	.display-project .display-env .display-tools .display-flags \
7b83a9
		.display-pe .display-elf .display-dirs .display-build
7b83a9
31ef73
.display-project:
31ef73
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
31ef73
		@echo BUILD_DIR:'              '$(CURDIR)
31ef73
		@echo
31ef73
7b83a9
.display-env:
7b83a9
		@echo BUILD:'                  '$(BUILD)
7b83a9
		@echo HOST:'                   '$(HOST)
7b83a9
		@echo TARGET:'                 '$(TARGET)
7b83a9
		@echo ARCH:'                   '$(ARCH)
f97c34
		@echo COMPILER:'               '$(COMPILER)
651d7b
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
7b83a9
		@echo SYSROOT:'                '$(SYSROOT)
612929
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
7b83a9
		@echo SHELL:'                  '$(SHELL)
967e4d
		@echo
7b83a9
7b83a9
.display-tools:
7b83a9
		@echo CC:'                     '$(CC)
7b83a9
		@echo CPP:'                    '$(CPP)
7b83a9
		@echo CXX:'                    '$(CXX)
7b83a9
		@echo
7b83a9
		@echo AS:'                     '$(AS)
7b83a9
		@echo AR:'                     '$(AR)
7b83a9
		@echo LD:'                     '$(LD)
7b83a9
		@echo NM:'                     '$(NM)
7b83a9
		@echo OBJDUMP:'                '$(OBJDUMP)
7b83a9
		@echo RANLIB:'                 '$(RANLIB)
7b83a9
		@echo SIZE:'                   '$(SIZE)
7b83a9
		@echo STRIP:'                  '$(STRIP)
7b83a9
		@echo STRINGS:'                '$(STRINGS)
7b83a9
		@echo
7b83a9
		@echo ADDR2LINE:'              '$(ADDR2LINE)
7b83a9
		@echo COV:'                    '$(COV)
7b83a9
		@echo CXXFILT'                 '$(CXXFILT)
7b83a9
		@echo ELFEDIT:'                '$(ELFEDIT)
7b83a9
		@echo OBJCOPY:'                '$(OBJCOPY)
7b83a9
		@echo READELF:'                '$(READELF)
7b83a9
		@echo
7b83a9
7b83a9
.display-flags:
7b83a9
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
7b83a9
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
7b83a9
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
7b83a9
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
7b83a9
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
7b83a9
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
7b83a9
		@echo
7b83a9
		@echo LDFLAGS_DEBUG:'           '$(LDFLAGS_DEBUG)
7b83a9
		@echo LDFLAGS_COMMON:'          '$(LDFLAGS_COMMON)
7b83a9
		@echo LDFLAGS_CMDLINE:'         '$(LDFLAGS_CMDLINE)
7b83a9
		@echo LDFLAGS_CONFIG:'          '$(LDFLAGS_CONFIG)
7b83a9
		@echo LDFLAGS_SYSROOT:'         '$(LDFLAGS_SYSROOT)
7b83a9
		@echo LDFLAGS_PATH:'            '$(LDFLAGS_PATH)
7b83a9
		@echo
7b83a9
7b83a9
.display-pe:
7b83a9
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
7b83a9
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
7b83a9
		@echo PE_CONFIG_DEFS:'         '$(PE_CONFIG_DEFS)
7b83a9
		@echo
7b83a9
7b83a9
.display-elf:
7b83a9
		@echo ELF_EH_FRAME:'           '$(ELF_EH_FRAME)
7b83a9
		@echo ELF_HASH_STYLE:'         '$(ELF_HASH_STYLE)
7b83a9
		@echo ELF_CONFIG_DEFS:'        '$(ELF_CONFIG_DEFS)
7b83a9
		@echo
7b83a9
7b83a9
.display-dirs:
7b83a9
		@echo PREFIX:'                 '$(PREFIX)
7b83a9
		@echo BINDIR:'                 '$(BINDIR)
7b83a9
		@echo LIBDIR:'                 '$(LIBDIR)
7b83a9
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
7b83a9
		@echo SYSLIBDIR:'              '$(SYSLIBDIR)
7b83a9
		@echo MANDIR:'                 '$(MANDIR)
7b83a9
		@echo DOCDIR:'                 '$(DOCDIR)
7b83a9
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
7b83a9
		@echo
7b83a9
7b83a9
.display-build:
7b83a9
		@echo NATIVE_CC:'              '$(NATIVE_CC)
7b83a9
		@echo NATIVE_OS:'              '$(NATIVE_OS)
7b83a9
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
292211
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
7b83a9
		@echo
2318d6
		@echo USER_CC:'                '$(USER_CC)
2318d6
		@echo USER_CPP:'               '$(USER_CPP)
2318d6
		@echo USER_CXX:'               '$(USER_CXX)
2318d6
		@echo
7b83a9
7b83a9
7b83a9
.PHONY:		all install shared static .display \
7b83a9
		shared-objs shared-lib shared-implib \
7b83a9
		static-objs static-lib \
7b83a9
		install-shared install-static install-implib \
7b83a9
		install-headers \
7b83a9
		clean distclean \
31ef73
		.display-project .display-env .display-tools .display-flags \
7b83a9
		.display-pe .display-elf .display-dirs .display-build