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