Commit 00bb7e5f authored by nagayama15's avatar nagayama15

Makefileを分割

parent 723ebf82
...@@ -17,10 +17,10 @@ LDFLAGS := \ ...@@ -17,10 +17,10 @@ LDFLAGS := \
.PHONY: all test clean .PHONY: all test clean
all: nykk.so test_pass all: nykk.so
test: test_pass test:
./test_pass ${MAKE} -C test run
nykk.so: \ nykk.so: \
src/nykk/pass/TestPass.o \ src/nykk/pass/TestPass.o \
...@@ -31,16 +31,9 @@ src/nykk/pass/BlockWatermarkPass.o: \ ...@@ -31,16 +31,9 @@ src/nykk/pass/BlockWatermarkPass.o: \
src/nykk/pass/BlockWatermarkPass.cpp \ src/nykk/pass/BlockWatermarkPass.cpp \
src/nykk/PermutationTable.hpp src/nykk/PermutationTable.hpp
test/Test.o: \
test/Test.cpp \
test/TestPermutationTable.hpp \
src/nykk/PermutationTable.hpp
test_pass: test/Test.o
${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS}
%.so: %.so:
${CXX} ${CXXFLAGS} -shared -o $@ $^ ${LDFLAGS} ${CXX} ${CXXFLAGS} -shared -o $@ $^ ${LDFLAGS}
clean: clean:
${RM} *.so test_pass src/*/*.o src/*/*/*.o test/*.o ${MAKE} -C test clean
${RM} *.so src/*/*.o src/*/*/*.o
CXXFLAGS := \
-std=c++17 \
-Wall \
-Wextra \
-pedantic \
-Werror \
-fPIC
LDFLAGS :=
.PHONY: all run clean
all: test_pass
run: test_pass
./test_pass
test_pass: Test.o
${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS}
Test.o: \
Test.cpp \
TestPermutationTable.hpp \
../src/nykk/PermutationTable.hpp
clean:
${RM} test_pass *.o
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment