diff test/callback_suite_aggrs/Makefile.embedded @ 523:cd46e111bc4c

- new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
author Tassilo Philipp
date Wed, 13 Apr 2022 14:59:57 +0200
parents
children 71c884e610f0
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/callback_suite_aggrs/Makefile.embedded	Wed Apr 13 14:59:57 2022 +0200
@@ -0,0 +1,32 @@
+APP = callback_suite_aggrs
+OBJS = globals.o cases.o main.o
+
+SRCTOP   = ../..
+BLDTOP   = ${SRCTOP}
+CFLAGS  += -I${SRCTOP}/dyncall -I${SRCTOP}/dyncallback
+LDFLAGS += -L${BLDTOP}/dyncall -L${BLDTOP}/dyncallback
+LDLIBS  += -ldyncall_s -ldyncallback_s
+
+all: ${APP}
+
+.PHONY: all clean install
+
+${APP}: ${OBJS} 
+	${CC} ${OBJS} ${LDFLAGS} ${LDLIBS} -o ${APP} 
+
+config:
+	${LUA} mk-cases.lua <design.txt >cases.h
+config-random:
+	# need two versions for platforms allowing empty aggregates (non-standard) or not
+	# nonemptyaggrs.txt version differs only if config.lua's minaggrfields=0
+	cp config.lua config.lua.cases
+	sed -e '/minaggrfields[[:space:]]*=[[:space:]]*0/s/=.*/=1/;t' -e d config.lua.cases >> config.lua
+	${LUA} rand-sig.lua >nonemptyaggrs.txt
+	mv config.lua.cases config.lua
+	${LUA} rand-sig.lua >cases.txt
+	${LUA} mk-cases.lua <nonemptyaggrs.txt >nonemptyaggrs.h
+	${LUA} mk-cases.lua <cases.txt >cases.h
+cases.o: cases.h
+clean:
+	rm -f ${APP} ${OBJS}
+