-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (24 loc) · 978 Bytes
/
Makefile
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
include Makefile.in
#############################################################################
INCLUDE = -I $(LIB_DIR)
RPATH = -rpath=$(LIB_DIR)
COPTS += $(INCLUDE)
CXXOPTS += $(INCLUDE)
###### targets ##############################################################
### (the main target makes use of the "libINtecplot.so" library)
all: lib
$(CXX) $(CXXOPTS) $(DEBUG) -I $(LIB_DIR) main.cpp \
-Wl,$(RPATH) -L $(LIB_DIR) -lINtecplot
### (the software is made into a library: "libINtecplot.so" and makes use of
### the "libINutils.so" library)
lib: utils
$(CXX) $(CXXOPTS) $(DEBUG) -I $(LIB_DIR) -c intecplot.cpp
$(CXX) -shared -Wl,-rpath=$(LIB_DIR),-soname,libINtecplot.so -o libINtecplot.so \
intecplot.o -lc -L $(LIB_DIR) -lINutils
### (a lean version of the "libINutils.so" library is built here)
utils:
$(CC) $(COPTS) -c utils.c
$(CC) -shared -Wl,-soname,libINutils.so -o libINutils.so \
utils.o -lc
clean:
rm -f *.o a.out *.so