ee36a396cd
This tool is very preliminary but could be use for whatever purpose since the format of the rsrc sections is now known. By the way it appears that this format is the same as the one use by the stmp36xx for its resources. Change-Id: Idd7057f5cdce5af9726904169bb100c8bacb0981
29 lines
621 B
Makefile
29 lines
621 B
Makefile
DEFINES=-DCRYPTO_LIBUSB
|
|
CC=gcc
|
|
LD=gcc
|
|
CFLAGS=-g -std=c99 -W -Wall `pkg-config --cflags libusb-1.0` $(DEFINES)
|
|
LDFLAGS=`pkg-config --libs libusb-1.0`
|
|
BINS=elftosb sbtoelf sbloader rsrctool
|
|
|
|
all: $(BINS)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
sbtoelf: sbtoelf.o crc.o crypto.o aes128.o sha1.o xorcrypt.o elf.o misc.o sb.o sb1.o
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
|
|
|
elftosb: elftosb.o crc.o crypto.o aes128.o sha1.o elf.o dbparser.o misc.o sb.o
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
|
|
|
sbloader: sbloader.o
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
|
|
|
rsrctool: rsrctool.o rsrc.o misc.o
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -fr *.o
|
|
|
|
veryclean:
|
|
rm -rf $(BINS)
|