-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (42 loc) · 1.92 KB
/
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
46
47
48
49
50
51
52
53
BASE_DIR := ./
SRC_DIR := $(BASE_DIR)src/
SERIAL_DIR := $(SRC_DIR)serial/
export CXX := g++
CXXFLAGS = -O3 -std=c++20 -I$(SERIAL_DIR)
MatrixTestPath = "test/MatrixTest/"
ActivatorsTestPath = "test/ActivatorsTest/"
NetworkTestPath = "test/NetworkTest/"
test: ./test/MatrixTest/* ./test/ActivatorsTest/* ./test/NetworkTest/*
# Test the matrix class
cd ./test/MatrixTest/ ;
$(CXX) $(CXXFLAGS) ./test/MatrixTest/MatrixSum.cc -o $(MatrixTestPath)MatrixSum.out ;
$(CXX) $(CXXFLAGS) ./test/MatrixTest/MatrixTransposition.cc -o $(MatrixTestPath)MatrixTransposition.out ;
$(CXX) $(CXXFLAGS) ./test/MatrixTest/MatrixMultiplication.cc -o $(MatrixTestPath)MatrixMultiplication.out ;
touch MatrixTest.sh ; chmod +x MatrixTest.sh ;
echo "#" > MatrixTest.sh ;
echo "" >> MatrixTest.sh ;
echo "./$(MatrixTestPath)MatrixSum.out" >> MatrixTest.sh ;
echo "./$(MatrixTestPath)MatrixTransposition.out" >> MatrixTest.sh ;
echo "./$(MatrixTestPath)MatrixMultiplication.out" >> MatrixTest.sh ;
# Test the activators
cd ./test/ActivatorsTest/ ;
$(CXX) $(CXXFLAGS) ./test/ActivatorsTest/Activators.cc -o $(ActivatorsTestPath)Activators.out ;
touch ActivatorsTest.sh ; chmod +x ActivatorsTest.sh ;
echo "#" > ActivatorsTest.sh ;
echo "" >> ActivatorsTest.sh ;
echo "$(ActivatorsTestPath)Activators.out" >> ActivatorsTest.sh ;
# Test the neural network classes with basic functions
cd ./test/NetworkTest/ ;
$(CXX) $(CXXFLAGS) ./test/NetworkTest/OrFunction.cc -o $(NetworkTestPath)Or.out ;
$(CXX) $(CXXFLAGS) ./test/NetworkTest/AndFunction.cc -o $(NetworkTestPath)And.out ;
$(CXX) $(CXXFLAGS) ./test/NetworkTest/XorFunction.cc -o $(NetworkTestPath)Xor.out ;
touch NetworkTest.sh ; chmod +x NetworkTest.sh ;
echo "#" > NetworkTest.sh ;
echo "" >> NetworkTest.sh ;
echo "$(NetworkTestPath)Or.out" >> NetworkTest.sh ;
echo "$(NetworkTestPath)And.out" >> NetworkTest.sh ;
echo "$(NetworkTestPath)Xor.out" >> NetworkTest.sh ;
clear ;
clean:
rm -f *.out
clear