view test/callback_suite_aggrs/Makefile.generic @ 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 source

APP      = callback_suite_aggrs
OBJS     = globals.o cases.o main.o
SRCTOP   = ${VPATH}/../..
BLDTOP   = ../..
CFLAGS  += -I${SRCTOP}/dyncall -I${SRCTOP}/dyncallback
LDLIBS  += -L${BLDTOP}/dyncall -ldyncall_s -L${BLDTOP}/dyncallback -ldyncallback_s
LUA      = lua

.PHONY: all clean install config
all: ${APP}
${APP}: ${OBJS} 
	${CC} ${CFLAGS} ${LDFLAGS} ${OBJS} ${LDLIBS} -o ${APP}
clean:
	rm -f ${APP} ${OBJS}
install:
	mkdir -p ${PREFIX}/test
	cp ${APP} ${PREFIX}/test
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