forked from len0rd/rockbox
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
22 lines
408 B
Makefile
22 lines
408 B
Makefile
CC=gcc
|
|
AR=ar
|
|
HWEMUL_LIB_DIR=../lib
|
|
CFLAGS=-W -Wall -O2 `pkg-config --cflags libusb-1.0` -std=c99 -g -I$(HWEMUL_LIB_DIR)
|
|
LDFLAGS=`pkg-config --libs libusb-1.0`
|
|
EXEC=hwemul_tool
|
|
HWEMUL_LIB=$(HWEMUL_LIB_DIR)/libhwemul.a
|
|
SRC=$(wildcard *.c)
|
|
OBJ=$(SRC:.c=.o)
|
|
|
|
all: $(EXEC)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
hwemul_tool: hwemul_tool.o $(HWEMUL_LIB)
|
|
$(CC) $(LDFLAGS) -o $@ $^
|
|
|
|
clean:
|
|
rm -rf $(OBJ) $(LIB)
|
|
|
|
|