/
Makefile
45 lines (38 loc) · 1011 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
34
35
36
37
38
39
40
41
42
43
44
45
# ---------------------------------------------------------------------------
#
# Makefile for wstree
#
# Devon Powell
# (with some useful bits from Jonathan Zrake)
#
# Do not modify this file!
# All user-set options live in Makefile.in
#
# usage: make
#
# ---------------------------------------------------------------------------
# if there is no Makefile.in then use the template
ifneq ($(strip $(MAKEFILE_IN)),)
# use value of MAKEFILE_IN if provided on the command line
else ifeq ($(shell test -e Makefile.in && echo 1), 1)
MAKEFILE_IN = Makefile.in
else
MAKEFILE_IN = Makefile.in.template
endif
include $(MAKEFILE_IN)
# Source files
SOURCES = wstree.cpp
COMMON = HDF_IO.hh
OBJ = $(SOURCES:.cpp=.o)
EXE = wstree
# Set up HDF5 dependencies
INC += -I$(HDF5_HOME)/include
LIB += -L$(HDF5_HOME)/lib
LDFLAGS += -lhdf5
all: $(EXE)
$(EXE): $(COMMON) $(OBJ)
$(CC) $(LIB) $(OBJ) -o $@ $(LDFLAGS) $(CFLAGS)
.cpp.o: $(COMMON)
$(CC) $(INC) $(DEF) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJ) *~ core $(EXE)