Blame Makefile.in

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