summaryrefslogtreecommitdiff
path: root/libs/greatest/Makefile
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-09-14 15:27:51 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-09-14 15:27:51 +0200
commit76d3082e5b89fe54acaaaaadd201ccc92f4f346e (patch)
tree32d5212d87bc0b4cab06bcbe923f7eeb019268b0 /libs/greatest/Makefile
parent38019a9693375ac6719ffec43bff63774e142387 (diff)
tests for administration io
Diffstat (limited to 'libs/greatest/Makefile')
-rw-r--r--libs/greatest/Makefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/libs/greatest/Makefile b/libs/greatest/Makefile
new file mode 100644
index 0000000..24c1881
--- /dev/null
+++ b/libs/greatest/Makefile
@@ -0,0 +1,52 @@
+# Warning flags for C and C++:
+COMMON_FLAGS += -Wall -Wextra -pedantic -Werror
+COMMON_FLAGS += -Wmissing-declarations -g
+#COMMON_FLAGS += -Weverything
+
+CFLAGS += ${COMMON_FLAGS}
+CPPFLAGS += ${COMMON_FLAGS}
+
+# These warnings are not valid for C++:
+CFLAGS += -Wmissing-prototypes
+CFLAGS += -Wstrict-prototypes
+
+PROGRAMS_C= example example_no_suite example_no_runner \
+ example_shuffle example_trunc
+PROGRAMS_CPP= example_cpp
+
+# Uncomment to demo c99 parametric testing.
+#CFLAGS += -std=c99
+
+# Uncomment to enable setjmp()/longjmp().
+#CFLAGS += -DGREATEST_USE_LONGJMP=1
+
+# Uncomment to disable clock() / time.h.
+#CFLAGS += -DGREATEST_USE_TIME=0
+
+all: all_c
+
+all_c: ${PROGRAMS_C}
+all_cpp: ${PROGRAMS_CPP}
+
+example: example.o example_suite.o
+example_no_suite: example_no_suite.o
+example_no_runner: example_no_runner.o
+example_shuffle: example_shuffle.o
+example_trunc: example_trunc.o
+
+*.o: greatest.h Makefile
+
+example_cpp: example_cpp.cpp greatest.h Makefile
+ ${CXX} -o $@ example_cpp.cpp ${CPPFLAGS} ${LDFLAGS}
+
+%.o: %.c
+ ${CC} -c -o $@ ${CFLAGS} $<
+
+%.o: %.cpp
+ ${CXX} -c -o $@ ${CPPFLAGS} $<
+
+%: %.o
+ ${CC} -o $@ ${LDFLAGS} $^
+
+clean:
+ rm -f ${PROGRAMS_C} ${PROGRAMS_CPP} *.o *.core