diff Makefile @ 254:3d1e2af4e4e6

Start of a very simplistic unit test suite. Initially handling just printf() style functions.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 16 Feb 2016 21:28:00 +0200
parents
children 3f05f6fb5dfd
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Tue Feb 16 21:28:00 2016 +0200
@@ -0,0 +1,37 @@
+#
+# Configuration settings for Linux and generic UNIX
+# See other Makefile.* files for more options.
+#
+
+# C-compiler, flags and linker flags
+CC ?= gcc
+AR ?= ar
+RANLIB ?= ranlib
+INSTALL ?= install
+
+CFLAGS += -DHAVE_STRING_H -DHAVE_STDINT_H -DHAVE_CONFIG_H=1 -I. -DTH_USE_INTERNAL_SPRINTF=1
+LDFLAGS +=
+
+#CFLAGS += -DHAVE_STDINT_H
+#CFLAGS += -DHAVE_SYS_TYPES_H
+
+# Miscellaneous
+BINPATH=./
+OBJPATH=obj/unix/
+EXEEXT=
+
+
+###
+### Stuff
+###
+ENDIANCHK_BIN=$(BINPATH)endianchk$(EXEEXT)
+NOINST_TARGETS += $(ENDIANCHK_BIN) config.h
+
+include Makefile.gen
+
+
+$(ENDIANCHK_BIN): endianchk.c
+	$(CC) $(CFLAGS) -o $@ $+
+
+config.h: $(ENDIANCHK_BIN)
+	$(ENDIANCHK_BIN) > $@