forked from radareorg/sdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.mk
56 lines (47 loc) · 875 Bytes
/
config.mk
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
DESTDIR?=
PREFIX?=/usr
VERSION=0.6.1
CFLAGS+=-DVERSION=\"${VERSION}\"
CFLAGS_STD?=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
CFLAGS+=${CFLAGS_STD}
CFLAGS+=-Wall
#CFLAGS+=-O3
#CFLAGS+=-ggdb -g -Wall -O0
HAVE_VALA=$(shell valac --version 2> /dev/null)
# This is hacky
HOST_CC?=gcc
RANLIB?=ranlib
OS?=$(shell uname)
ARCH?=$(shell uname -m)
ifeq (${OS},w32)
WCP?=i386-mingw32
CC=${WCP}-gcc
AR?=${WCP}-ar
CFLAGS_SHARED?=-fPIC -shared
EXEXT=.exe
else
CFLAGS_SHARED?=-fPIC -shared -fvisibility=hidden
CC?=gcc
EXEXT=
endif
# create .d files
CFLAGS+=-MMD
ifeq (${OS},Darwin)
SOEXT=dylib
LDFLAGS+=-dynamic
LDFLAGS_SHARED?=-fPIC -shared
ifeq (${ARCH},i386)
#CC+=-arch i386
CC+=-arch x86_64
endif
else
SOVERSION=0
SOEXT=so.0.0.0
LDFLAGS_SHARED?=-fPIC -shared
LDFLAGS_SHARED+=-Wl,-soname,libsdb.so.$(SOVERSION)
endif
ifeq ($(MAKEFLAGS),s)
SILENT=1
else
SILENT=
endif