2012-08-14 21:44:17 +08:00
|
|
|
ifeq ($(_INCLUDE_GLOBAL_MK_),)
|
|
|
|
_INCLUDE_GLOBAL_MK_=1
|
2009-03-11 05:58:00 +08:00
|
|
|
DESTDIR=
|
2012-10-03 20:31:35 +08:00
|
|
|
COMPILER?=gcc
|
2009-03-11 05:58:00 +08:00
|
|
|
|
2020-12-29 22:08:52 +08:00
|
|
|
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
|
2012-10-03 20:31:35 +08:00
|
|
|
BTOP:=$(TOP)/binr
|
2012-08-14 19:14:54 +08:00
|
|
|
|
2012-08-14 21:44:17 +08:00
|
|
|
ifeq ($(MAKEFLAGS),s)
|
|
|
|
SILENT=1
|
|
|
|
else
|
|
|
|
SILENT=
|
|
|
|
endif
|
|
|
|
|
2015-06-22 23:34:03 +08:00
|
|
|
ifndef USE_GIT_URLS
|
2015-08-24 01:34:55 +08:00
|
|
|
GIT_PREFIX=https://
|
2015-06-22 23:34:03 +08:00
|
|
|
else
|
|
|
|
GIT_PREFIX=git://
|
|
|
|
endif
|
|
|
|
|
2014-06-27 02:09:59 +08:00
|
|
|
rmdblslash=$(subst //,/,$(subst //,/,$(subst /$$,,$1)))
|
|
|
|
|
2012-10-03 20:31:35 +08:00
|
|
|
.c:
|
|
|
|
ifneq ($(SILENT),)
|
|
|
|
@echo LD $<
|
|
|
|
endif
|
|
|
|
$(CC) $(LDFLAGS) -c $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
ifneq ($(SILENT),)
|
2021-05-31 05:46:58 +08:00
|
|
|
@echo "[$(shell $(LIBR)/count.sh)] CC $<"
|
|
|
|
@$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
else
|
2012-10-03 20:31:35 +08:00
|
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
2021-05-31 05:46:58 +08:00
|
|
|
endif
|
2012-10-03 20:31:35 +08:00
|
|
|
|
2012-08-14 19:14:54 +08:00
|
|
|
-include $(TOP)/config-user.mk
|
2015-10-09 23:58:03 +08:00
|
|
|
-include $(TOP)/mk/platform.mk
|
2012-08-14 19:14:54 +08:00
|
|
|
-include $(TOP)/mk/${COMPILER}.mk
|
2018-10-15 06:54:03 +08:00
|
|
|
|
|
|
|
WWWROOT=${DATADIR}/radare2/${VERSION}/www
|
2012-08-14 21:44:17 +08:00
|
|
|
endif
|