2012-08-14 21:44:17 +08:00
|
|
|
ifeq ($(_INCLUDE_GLOBAL_MK_),)
|
|
|
|
_INCLUDE_GLOBAL_MK_=1
|
2009-04-26 03:43:47 +08:00
|
|
|
RELEASE=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
|
|
|
|
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
|
|
|
|
|
2009-03-31 08:50:02 +08:00
|
|
|
# verbose error messages everywhere
|
2009-03-31 18:55:26 +08:00
|
|
|
STATIC_DEBUG=0
|
2009-03-31 08:50:02 +08:00
|
|
|
|
2009-03-11 05:58:00 +08:00
|
|
|
ifeq (${RELEASE},1)
|
|
|
|
PREFIX=/usr/local
|
|
|
|
else
|
|
|
|
PREFIX=${PWD}/prefix
|
|
|
|
VERSION=`date '+%Y%m%d'`
|
|
|
|
endif
|
2009-03-31 08:57:39 +08:00
|
|
|
|
2011-03-14 03:27:28 +08:00
|
|
|
PFX=${DESTDIR}${PREFIX}
|
2011-07-03 19:06:16 +08:00
|
|
|
MDR=${DESTDIR}${MANDIR}
|
2011-03-14 03:27:28 +08:00
|
|
|
|
2009-04-01 08:28:13 +08:00
|
|
|
LIBDIR=${PREFIX}/lib
|
2013-04-19 05:11:12 +08:00
|
|
|
WWWROOT=${DATADIR}/radare2/${VERSION}/www
|
2009-04-01 08:28:13 +08:00
|
|
|
|
2012-10-03 20:31:35 +08:00
|
|
|
.c:
|
|
|
|
ifneq ($(SILENT),)
|
|
|
|
@echo LD $<
|
|
|
|
endif
|
|
|
|
$(CC) $(LDFLAGS) -c $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
ifneq ($(SILENT),)
|
2012-10-04 07:20:00 +08:00
|
|
|
@echo CC $(shell basename $<)
|
2012-10-03 20:31:35 +08:00
|
|
|
endif
|
|
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2012-08-14 19:14:54 +08:00
|
|
|
-include $(TOP)/config-user.mk
|
|
|
|
-include $(TOP)/mk/${COMPILER}.mk
|
2012-08-14 21:44:17 +08:00
|
|
|
endif
|