forked from NITDgpOS/advCalc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (31 loc) · 880 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
39
40
41
42
43
44
45
TARGET = calc
QT_TARGET = calc_qt
LIBS = -lreadline
CFLAGS = -std=c++14
TESTS_FILE = tests/simpleTests.calc
BUGS_FILE = tests/bugTests.calc
PREFIX = /usr/local
LIBOBJ = str.o calcError.o calcOptr.o
OBJECTS = $(LIBOBJ) input_bindings.o main.o
RM = rm -f
.PHONY: clean all cleanall install tests lib all_gui
all: calc
$(TARGET): main.o calcOptr.o input_bindings.o calcError.o str.o
$(CXX) $(CFLAGS) -o $@ $^ $(LIBS)
%.o: %.cpp
$(CXX) -c $(CFLAGS) $(CXXFLAGS) $<
clean:
-$(RM) *.o
-cd calc_ui_qt && make clean
cleanall:
-$(RM) $(TARGET) $(QT_TARGET) *.o *.gch
-cd calc_ui_qt && make clean
-cd calc_ui_qt && $(RM) Makefile calc_ui_qt *.gch *.o
install: $(TARGET)
cp $(TARGET) $(PREFIX)/bin
tests: $(TARGET)
./$(TARGET) -f $(TESTS_FILE)
./$(TARGET) -f $(BUGS_FILE)
all_gui: $(QT_TARGET)
$(QT_TARGET): calc_ui_qt/
-cd calc_ui_qt && qmake calc_ui_qt.pro && make