Files
HandmadeMath/test/Makefile
Ben Visness cf606db217 Test in both C and C++ (#58)
* Switch to custom unit testing that is compatible with C

* Remove Google Test framework

* Attempt to fix missing math functions

* Link against C math library

* Try forcing c99 again

* Include -lm at compile time

* Move -lm argument to the end

* Update README and gitignore
2017-04-07 08:47:54 -05:00

18 lines
594 B
Makefile

ROOT_DIR = ..
CXXFLAGS += -g -Wall -Wextra -pthread -Wno-missing-braces -Wno-missing-field-initializers
all: c cpp
clean:
rm -f hmm_test_c hmm_test_cpp *.o
c: $(ROOT_DIR)/test/HandmadeMath.c test_impl
$(CC) $(CPPFLAGS) $(CXXFLAGS) -std=c99 -c $(ROOT_DIR)/test/HandmadeMath.c $(ROOT_DIR)/test/hmm_test.c -lm
$(CC) -ohmm_test_c HandmadeMath.o hmm_test.o -lm
cpp: $(ROOT_DIR)/test/HandmadeMath.cpp test_impl
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -ohmm_test_cpp $(ROOT_DIR)/test/HandmadeMath.cpp $(ROOT_DIR)/test/hmm_test.cpp
test_impl: $(ROOT_DIR)/test/hmm_test.cpp $(ROOT_DIR)/test/hmm_test.c