forked from xcv58/LeetCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (28 loc) · 1.14 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
SRC_JAVA = $(shell find . -name *.java)
SRC_CPP = $(shell find . -name *.cpp)
SRC_C = $(shell find . -name *.c)
TARGET_JAVA = $(SRC_JAVA:%.java=%.class)
TARGET_OBJ = $(SRC_CPP:%.cpp=%.obj)
TARGET_O = $(SRC_C:%.c=%.o)
all: $(TARGET_JAVA) $(TARGET_O) $(TARGET_OBJ)
%.class: %.java
javac -classpath $(shell dirname $<) $<
%.o: %.c
gcc -c $< -o $@
%.obj: %.cpp
gcc -c $< -o $@
clean:
rm -f $(TARGET_JAVA)
rm -f $(TARGET_O)
rm -f $(TARGET_OBJ)
todo:
@ag -g "cpp|py|java" | sed -e 's/\/.*//' | sort | uniq -c | sort | ag "^\s*[12]"
commited:
@git ls-files --directory | grep "/" | sed "s/\/.*//" | sort | uniq
@git ls-files --directory | grep "/" | sed "s/\/.*//" | sort | uniq | wc -l
uncommit:
@(ag -g "cpp|py|java" | sed -e 's/\/.*//' | sort | uniq; git ls-files --directory | grep "/" | sed "s/\/.*//" | sort | uniq) | sort | uniq -u
@(ag -g "cpp|py|java" | sed -e 's/\/.*//' | sort | uniq; git ls-files --directory | grep "/" | sed "s/\/.*//" | sort | uniq) | sort | uniq -u | wc -l
total:
@ag -g "cpp|py|java" | sed -e 's/\/.*//' | sort | uniq | sort | uniq -u
@ag -g "cpp|py|java" | sed -e 's/\/.*//' | sort | uniq | sort | uniq -u | wc -l