0c6b63479d
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
28 lines
524 B
Makefile
28 lines
524 B
Makefile
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)
|