-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
56 lines (42 loc) · 826 Bytes
/
makefile
File metadata and controls
56 lines (42 loc) · 826 Bytes
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
# Example makefile for using the mat libraries
BIN=kmeans
BIN2=kmeansp
# what you want to name your tar/zip file:
TARNAME=ChereckAss5CS475
CXX=g++
CXXFLAGS=-O3 -Wall # optimize
CXXFLAGS=-g -Wall # debug
LIBS = -lm
EXAMPLES=
EXTRAS=\
randf.cpp\
randmt.cpp
SRCS=\
$(BIN).cpp\
$(BIN2).cpp\
mat.cpp\
rand.cpp
HDRS=\
rand.h\
mat.h
OBJS=\
$(BIN).o\
mat.o\
rand.o
OBJS2=\
$(BIN2).o\
mat.o\
rand.o
all: $(BIN) $(BIN2)
$(BIN): $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $(BIN)
$(BIN2): $(OBJS2)
$(CXX) $(CXXFLAGS) $(OBJS2) $(LIBS) -o $(BIN2)
clean:
/bin/rm -f *.o $(BIN)*.tar $(BIN2)*.tar $(BIN) $(BIN2) *~ core gmon.out a.out
tar:
tar -cvf $(TARNAME).tar makefile $(EXAMPLES) $(SRCS) $(HDRS)
ls -l $(TARNAME).tar
zip:
zip $(TARNAME).zip makefile $(EXAMPLES) $(SRCS) $(HDRS) $(EXTRAS)
ls -l $(TARNAME).zip