From 0c6b63479d83ada8782c751f779fef1271e2b874 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 14 Nov 2012 12:35:21 +0100 Subject: imxtools: add regtools to work with register descriptions These tools allow one to read a register description in a XML file and to produce something useful out of it. Three example programs are written: - tester which simply prints the register tree - headergen which produces a set of headers with the #define - hwemulgen which produces something for the hwemul tool (to come) Change-Id: I52573688b29d5faeaf64ce7c5ffe08ee8db3d33c --- utils/imxtools/regtools/Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 utils/imxtools/regtools/Makefile (limited to 'utils/imxtools/regtools/Makefile') diff --git a/utils/imxtools/regtools/Makefile b/utils/imxtools/regtools/Makefile new file mode 100644 index 0000000..5dad380 --- /dev/null +++ b/utils/imxtools/regtools/Makefile @@ -0,0 +1,28 @@ +DEFINES= +CC=gcc +CXX=g++ +LD=g++ +CFLAGS=-g -std=c99 -W -Wall `xml2-config --cflags` $(DEFINES) +CXXFLAGS=-g -W -Wall `xml2-config --cflags` $(DEFINES) +LDFLAGS=`xml2-config --libs` +BINS= tester headergen hwemulgen + +all: $(BINS) + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c -o $@ $< + +headergen: headergen.o desc_parser.o + $(LD) -o $@ $^ $(LDFLAGS) + +hwemulgen: hwemulgen.o desc_parser.o + $(LD) -o $@ $^ $(LDFLAGS) + +tester: tester.o desc_parser.o + $(LD) -o $@ $^ $(LDFLAGS) + +clean: + rm -fr *.o $(BINS) -- cgit v1.1