rockbox/utils/imxtools/hwemul/lib/Makefile
Amaury Pouly f44d95630c imxtools: introduce hwemul
The hwemul tool is a small binary blob running on the device
that can received commands over USB. It is mainly intended to be
loaded using the recory mode and allows to read/write registers,
memory, use the OTP device, ... The tool is split into three
parts: dev/ contains the actual blob (which handles both imx233
and stmp3700), lib/ contains the communication library and can
also use the register description produced by the regtools/
to ease register by name, tools/ contains an interactive tool
to send commands to the device when running the blob.

Change-Id: Ie8cb32e987f825d8ed750d48071e43415b4dacb3
2012-11-14 12:51:51 +01:00

27 lines
595 B
Makefile

CC=gcc
AR=ar
CFLAGS=-W -Wall -O2 `pkg-config --cflags libusb-1.0` -std=c99 -g -fPIC
LDFLAGS=`pkg-config --libs libusb-1.0` -fPIC
LIB=libhwemul.a
REGTOOLS=../../regtools
DESC=$(REGTOOLS)/desc
HWEMULGEN=$(REGTOOLS)/hwemulgen
HWEMULSOC_PREFIX=hwemul_soc
SRC=$(wildcard *.c) $(HWEMULSOC_PREFIX).c
OBJ=$(SRC:.c=.o)
all: $(LIB) $(EXEC)
$(HWEMULSOC_PREFIX).c $(HWEMULSOC_PREFIX).h:
$(HWEMULGEN) $(DESC)/*.xml $(HWEMULSOC_PREFIX)
%.o: %.c $(HWEMULSOC_PREFIX).h
$(CC) $(CFLAGS) -c -o $@ $<
$(LIB): $(OBJ)
$(AR) rcs $@ $^
clean:
rm -rf $(OBJ) $(LIB) $(HWEMULSOC_PREFIX).c $(HWEMULSOC_PREFIX).h