-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (35 loc) · 1.25 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
CPP=g++ --std=c++11
CFLAGS= -Wall
all : main
main : main.o Gate.o oneInputGate.o twoInputGate.o InputGate.o OutputGate.o NegateGate.o AndGate.o NAndGate.o OrGate.o NOrGate.o XorGate.o XNorGate.o
$(CPP) $(CFLAGS) -o $@ $^
main.o : main.cpp
$(CPP) $(CFLAGS) -c $<
Gate.o : Gate.cpp Gate.hpp
$(CPP) $(CFLAGS) -c $<
oneInputGate.o : oneInputGate.cpp oneInputGate.hpp
$(CPP) $(CFLAGS) -c $<
twoInputGate.o : twoInputGate.cpp twoInputGate.hpp
$(CPP) $(CFLAGS) -c $<
InputGate.o : InputGate.cpp InputGate.hpp
$(CPP) $(CFLAGS) -c $<
OutputGate.o : OutputGate.cpp OutputGate.hpp
$(CPP) $(CFLAGS) -c $<
NegateGate.o : oneInputGates/NegateGate.cpp oneInputGates/NegateGate.hpp
$(CPP) $(CFLAGS) -c $<
AndGate.o : twoInputGates/AndGate.cpp twoInputGates/AndGate.hpp
$(CPP) $(CFLAGS) -c $<
NAndGate.o : twoInputGates/NAndGate.cpp twoInputGates/NAndGate.hpp
$(CPP) $(CFLAGS) -c $<
OrGate.o : twoInputGates/OrGate.cpp twoInputGates/OrGate.hpp
$(CPP) $(CFLAGS) -c $<
NOrGate.o : twoInputGates/NOrGate.cpp twoInputGates/NOrGate.hpp
$(CPP) $(CFLAGS) -c $<
XorGate.o : twoInputGates/XorGate.cpp twoInputGates/XorGate.hpp
$(CPP) $(CFLAGS) -c $<
XNorGate.o : twoInputGates/XNorGate.cpp twoInputGates/XNorGate.hpp
$(CPP) $(CFLAGS) -c $<
clean :
rm *.o
test: all
./main