Blame Makefile.in

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