Rizin
unix-like reverse engineering framework and cli tools
Makefile.inc
Go to the documentation of this file.
1 ifeq ($(V), 1)
2 Q =
3 else
4 Q = @
5 endif
6 
7 TARGET_OS ?= $(shell uname)
8 ifeq ($(TARGET_OS),)
9  TARGET_OS ?= $(OS)
10 endif
11 
12 ifneq (,$(filter Windows%,$(TARGET_OS)))
13 LIBLZ4 = liblz4-$(LIBVER_MAJOR)
14 LIBLZ4_EXP = liblz4.lib
15 WINBASED = yes
16 else
17 LIBLZ4_EXP = liblz4.dll.a
18  ifneq (,$(filter MINGW%,$(TARGET_OS)))
19 LIBLZ4 = liblz4
20 WINBASED = yes
21  else
22  ifneq (,$(filter MSYS%,$(TARGET_OS)))
23 LIBLZ4 = msys-lz4-$(LIBVER_MAJOR)
24 WINBASED = yes
25  else
26  ifneq (,$(filter CYGWIN%,$(TARGET_OS)))
27 LIBLZ4 = cyglz4-$(LIBVER_MAJOR)
28 WINBASED = yes
29  else
30 LIBLZ4 = liblz4.$(SHARED_EXT_VER)
31 WINBASED = no
32 EXT =
33  endif
34  endif
35  endif
36 endif
37 
38 ifeq ($(WINBASED),yes)
39 EXT = .exe
40 WINDRES = windres
41 endif
42 
43 #determine if dev/nul based on host environment
44 ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell uname)))
45 VOID := /dev/null
46 else
47  ifneq (,$(filter Windows%,$(OS)))
48 VOID := nul
49  else
50 VOID := /dev/null
51  endif
52 endif
53 
54 ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS%,$(shell uname)))
55 POSIX_ENV = Yes
56 else
57 POSIX_ENV = No
58 endif
59 
60 # Avoid symlinks when targetting Windows or building on a Windows host
61 ifeq ($(WINBASED),yes)
62 LN_S = cp -p
63 LN_SF = cp -p
64 else
65  ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell uname)))
66 LN_S = cp -p
67 LN_SF = cp -p
68  else
69  ifneq (,$(filter Windows%,$(OS)))
70 LN_S = cp -p
71 LN_SF = cp -p
72  else
73 LN_S = ln -s
74 LN_SF = ln -sf
75  endif
76  endif
77 endif
78 
79 ifneq (,$(filter $(shell uname),SunOS))
80 INSTALL ?= ginstall
81 else
82 INSTALL ?= install
83 endif
84 
85 INSTALL_PROGRAM ?= $(INSTALL) -m 755
86 INSTALL_DATA ?= $(INSTALL) -m 644
87 INSTALL_DIR ?= $(INSTALL) -d -m 755
#define Q(x)
#define EXT(T)
@ OS
Definition: inflate.h:24
void * p
Definition: libc.cpp:67
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask dev
Definition: sflib.h:88
static const char struct stat static buf struct stat static buf static vhangup int struct rusage static rusage struct sysinfo static info unsigned static __unused uname
Definition: sflib.h:153
static RzSocket * s
Definition: rtr.c:28
#define d(i)
Definition: sha256.c:44
#define a(i)
Definition: sha256.c:41
#define V(handle, symbol)
else