#Variables
include $(SCT_DAQ_ROOT)/build/Makefile.include
#Commands
include $(SCT_DAQ_ROOT)/build/Makefile.commands

# The parser can't cope with the stuff that's put in if all the defines are added...
CFLAGS = -I$(SCT_DAQ_ROOT)/RodDaq/CommonWithDsp -DI_AM_LINUX_HOST
xmlPrimList: CFLAGS = $(CPPFLAGS)

all: primParams.xml

primParams.xml: xmlPrimList.xml parse.py 
	cpp $(CFLAGS) -P $(SCT_DAQ_ROOT)/RodDaq/CommonWithDsp/primParams.h > primParams.P
	cat primParams.P | python2 parse.py

xmlPrimList.xml: xmlPrimList
	./xmlPrimList > xmlPrimList.xml

clean:
	$(RM) *.xml
	$(RM) primParams.P xmlPrimList

distclean: clean
	$(RM) *.pyc

.PHONY: all