-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
107 lines (82 loc) · 2.72 KB
/
Copy pathMakefile
File metadata and controls
107 lines (82 loc) · 2.72 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# $Id: Makefile 3625 2014-12-09 14:28:33Z bustico $
os=$(shell uname -s)
ifeq ($(os),Darwin)
IVY_PATH := $(HOME)/src-ext/ivy-c-3.6/src
CPPFLAGS = -MMD -I$(IVY_PATH)
DSO_EXT = .dylib
LD = g++ -dynamiclib -single_module
LDFLAGS = -L$(IVY_PATH) -L/sw/lib -framework OpenGL -framework AGL -framework Carbon
else
LIB:= lib
CPPFLAGS = -I/usr/local/include/Ivy
DSO_EXT = .so
LD = g++ -shared -fPIC
#PREFIX=/usr/local
ifndef PREFIX
PREFIX=/usr
LDFLAGS = -L$(PREFIX)/$(LIB)
else
LDFLAGS = -L$(PREFIX)/$(LIB)/ivy
endif
endif
CASESENSITIVE = "yes"
ifeq ($(CASESENSITIVE), "no")
PCRE_OPT=PCRE_CASELESS
REGCOMP_OPT=REG_ICASE
else
PCRE_OPT=0
REGCOMP_OPT=REG_EXTENDED
endif
REGEXP= -DUSE_PCRE_REGEX -DPCRE_OPT=$(PCRE_OPT)
PCREINC = $(shell pcre-config --cflags)
CXXFILES := Ivy.cxx IvyApplication.cxx
OBJECTS := $(CXXFILES:.cxx=.o)
DEPS := $(CXXFILES:.cxx=.d)
LD_QUICKSTART_INFO=
GCXXINCS=
LIBIVY = libIvy
LIBIVY_STATIC = $(LIBIVY).a
LIBIVY_SHARED = $(LIBIVY)$(DSO_EXT)
LIBIVY_DEPLIBS = -livy
ifdef DEBUG
CC= g++ -fPIC -g -Wall -pg $(CPPFLAGS)
DBG=debug
else
CC= g++ -fPIC -O2 -Wall $(CPPFLAGS)
DBG=
endif
default: $(LIBIVY_STATIC) $(LIBIVY_SHARED) \
testIvy testAggieCap testCopilot testVectornav testPingPong ivyLogger
%.o: %.cxx
$(CC) -c $<
$(LIBIVY_STATIC) : $(OBJECTS)
ar rv $(LIBIVY_STATIC) $(OBJECTS)
ranlib $(LIBIVY_STATIC)
$(LIBIVY_SHARED) : $(OBJECTS)
$(LD) -o $(LIBIVY_SHARED) $(OBJECTS) $(LDFLAGS) $(LIBIVY_DEPLIBS)
install: default
# headers
mkdir -p $(DESTDIR)$(PREFIX)/include/Ivy
install -m 0644 Ivy*.h $(DESTDIR)$(PREFIX)/include/Ivy
# libs
mkdir -p $(DESTDIR)$(PREFIX)/$(LIB)
install -m 0644 $(LIBIVY_STATIC) $(DESTDIR)$(PREFIX)/$(LIB)
install -m 0644 $(LIBIVY_SHARED) $(DESTDIR)$(PREFIX)/$(LIB)
LLDLIBS = -L. -Wl,-rpath,. -L$(IVY_PATH)/src -Wl,-rpath,/usr/local/lib64 -L/usr/local/lib64
testIvy : testIvy.cxx
g++ -g $(CPPFLAGS) $(LLDLIBS) -std=c++11 -o $@ testIvy.cxx -lIvy -pthread
testCopilot : testCopilot.cxx
g++ -g $(CPPFLAGS) $(LLDLIBS) -std=c++11 -o $@ testCopilot.cxx -lIvy -pthread
testAggieCap : testAggieCap.cxx
g++ -g $(CPPFLAGS) $(LLDLIBS) -std=c++11 -o $@ testAggieCap.cxx -lIvy -pthread
testVectornav : testVectornav.cxx
g++ -g $(CPPFLAGS) $(LLDLIBS) -std=c++11 -o $@ testVectornav.cxx -lIvy -pthread
testPingPong : testPingPong.cxx
g++ -g $(CPPFLAGS) $(LLDLIBS) -std=c++11 -o $@ testPingPong.cxx -lIvy -pthread
ivyLogger : IvyLogger.cxx
g++ -g $(CPPFLAGS) $(LLDLIBS) -std=c++11 -o $@ IvyLogger.cxx -lIvy -pthread
distclean clean :
rm -f $(LIBIVY_STATIC) $(LIBIVY_SHARED) \
$(OBJECTS) $(DEPS) \
core *.o *.d *~ *.moc testIvy testAggieCap testCopilot testVectornav testPingPong ivyLogger
-include *.d