-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
36 lines (27 loc) · 887 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
# ==============================================================================
# BEGIN template
# ==============================================================================
# parameters
EXE = pjudge
LIBS = -pthread
CXX = g++ -g -std=c++0x
SRCS = $(shell find src -name '*.cpp')
HEADERS = $(shell find src -name '*.hpp')
OBJS = $(addprefix obj/,$(notdir $(SRCS:%.cpp=%.o)))
$(EXE): $(OBJS)
$(CXX) $(LIBS) $(OBJS) -o $@
obj/%.o: src/%.cpp $(HEADERS)
mkdir -p obj
$(CXX) -c $< -o $@
.PHONY: clean
clean:
rm -rf $(EXE) obj
# ==============================================================================
# END template
# ==============================================================================
.PHONY: install
install:
cp pjudge /usr/local/bin
rm -rf /usr/local/share/pjudge
mkdir /usr/local/share/pjudge
cp -rf bundle/* /usr/local/share/pjudge