radare2/global.mk

54 lines
929 B
Makefile
Raw Normal View History

ifeq ($(_INCLUDE_GLOBAL_MK_),)
_INCLUDE_GLOBAL_MK_=1
DESTDIR=
COMPILER?=gcc
SPACE:=
SPACE+=
ifneq (,$(findstring $(SPACE),$(PREFIX)))
$(error PREFIX cannot contain spaces)
endif
ifneq (,$(findstring $(SPACE),$(shell pwd)))
$(error Current working directory cannot contain spaces)
endif
2012-08-14 19:14:54 +08:00
TOP:=$(dir $(lastword $(MAKEFILE_LIST)))
LTOP:=$(TOP)/libr
2013-06-27 09:07:59 +08:00
STOP:=$(TOP)/shlr
BTOP:=$(TOP)/binr
2012-08-14 19:14:54 +08:00
ifeq ($(MAKEFLAGS),s)
SILENT=1
else
SILENT=
endif
ifndef USE_GIT_URLS
GIT_PREFIX=https://
else
GIT_PREFIX=git://
endif
rmdblslash=$(subst //,/,$(subst //,/,$(subst /$$,,$1)))
.c:
ifneq ($(SILENT),)
@echo LD $<
endif
$(CC) $(LDFLAGS) -c $(CFLAGS) -o $@ $<
.c.o:
ifneq ($(SILENT),)
@echo "[$(shell $(LIBR)/count.sh)] CC $<"
@$(CC) -c $(CFLAGS) -o $@ $<
else
$(CC) -c $(CFLAGS) -o $@ $<
endif
2012-08-14 19:14:54 +08:00
-include $(TOP)/config-user.mk
-include $(TOP)/mk/platform.mk
2012-08-14 19:14:54 +08:00
-include $(TOP)/mk/${COMPILER}.mk
WWWROOT=${DATADIR}/radare2/${VERSION}/www
endif