Blame Makefile.in

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