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