mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 07:00:30 +00:00
48 lines
722 B
Makefile
48 lines
722 B
Makefile
ifeq ($(_INCLUDE_GLOBAL_MK_),)
|
|
_INCLUDE_GLOBAL_MK_=1
|
|
RELEASE=1
|
|
DESTDIR=
|
|
COMPILER?=gcc
|
|
|
|
TOP:=$(dir $(lastword $(MAKEFILE_LIST)))
|
|
LTOP:=$(TOP)/libr
|
|
BTOP:=$(TOP)/binr
|
|
|
|
ifeq ($(MAKEFLAGS),s)
|
|
SILENT=1
|
|
else
|
|
SILENT=
|
|
endif
|
|
|
|
# verbose error messages everywhere
|
|
STATIC_DEBUG=0
|
|
|
|
ifeq (${RELEASE},1)
|
|
PREFIX=/usr/local
|
|
else
|
|
PREFIX=${PWD}/prefix
|
|
VERSION=`date '+%Y%m%d'`
|
|
endif
|
|
|
|
PFX=${DESTDIR}${PREFIX}
|
|
MDR=${DESTDIR}${MANDIR}
|
|
|
|
LIBDIR=${PREFIX}/lib
|
|
WWWROOT=${LIBDIR}/radare2/${VERSION}/www
|
|
|
|
.c:
|
|
ifneq ($(SILENT),)
|
|
@echo LD $<
|
|
endif
|
|
$(CC) $(LDFLAGS) -c $(CFLAGS) -o $@ $<
|
|
|
|
.c.o:
|
|
ifneq ($(SILENT),)
|
|
@echo CC $(shell basename $<)
|
|
endif
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
-include $(TOP)/config-user.mk
|
|
-include $(TOP)/mk/${COMPILER}.mk
|
|
endif
|