mirror of
https://github.com/HandmadeMath/HandmadeMath.git
synced 2025-12-28 07:34:32 +00:00
* 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
18 lines
594 B
Makefile
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
|