forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.mk
More file actions
69 lines (57 loc) · 1.23 KB
/
global.mk
File metadata and controls
69 lines (57 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
TOP:=$(dir $(lastword $(MAKEFILE_LIST)))
LTOP:=$(TOP)/libr
STOP:=$(TOP)/shlr
BTOP:=$(TOP)/binr
SPRJ:=$(TOP)/subprojects
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:
ifeq ($(SILENT),)
$(CC) -c $(CFLAGS) -o $@ $<
else
#@echo "[$(shell $(LIBR)/count.sh)] CC $<"
@echo "[$(shell basename `pwd`)] CC $<"
@$(CC) -c $(CFLAGS) -o $@ $<
endif
-include $(TOP)/config-user.mk
-include $(TOP)/mk/platform.mk
-include $(TOP)/mk/${COMPILER}.mk
WWWROOT=$(DATADIR)/radare2/${VERSION}/www
PANELS=$(DATADIR)/radare2/${VERSION}/panels
endif
## global sdb stuff
USE_SDBTOOL=0
SDBPATH=$(LTOP)/../subprojects/sdb/
ifeq ($(BUILD_OS),windows)
BUILD_EXT_EXE=.exe
else
BUILD_EXT_EXE=
endif
SDB=$(SDBPATH)/sdb${BUILD_EXT_EXE}
SDBTOOL=$(SDBPATH)/sdb${BUILD_EXT_EXE} -r