-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
38 lines (29 loc) · 801 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
#
# GNU makefile for fastclsuster demo program
#============================================
# compiler options
#--------------------------------------------
CC = g++
CFLAGS = -Wall -g
LDFLAGS = -lstdc++
# project files
#--------------------------------------------
PROGRAM = hclust-demo
OBJECTS = demo.o fastcluster.o
TGZDIR = hclust-cpp
# rules
#--------------------------------------------
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CC) -o $@ $+ $(LDFLAGS)
# generic rule for compiling *.cpp -> *.o
%.o: %.cpp
$(CC) $(CFLAGS) $(CPPFLAGS) -c $*.cpp
clean:
rm -f $(PROGRAM) $(OBJECTS)
tgz:
ln -s . $(TGZDIR)
tar cvzf $(TGZDIR).tgz \
$(TGZDIR)/*.cpp $(TGZDIR)/*.h $(TGZDIR)/*.csv $(TGZDIR)/*.r \
$(TGZDIR)/README.md $(TGZDIR)/LICENSE $(TGZDIR)/Makefile $(TGZDIR)/CHANGES
rm $(TGZDIR)