4e95b72ecb
The STMP36xx series also uses .sb files but with a different format. The main differences are the encryption and the lack of sections, making it basically a list of commands: fill, load, call, jump, switch mode, set sdram settings. Currently only the sbtoelf has support for the sb1 and can only dump the list of commands. Actual support for elf creation will come later. Change-Id: I1f2e0230c91ac64efd0e8430e0c5212098c599fd
26 lines
549 B
Makefile
26 lines
549 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
|
|
|
|
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)
|
|
|
|
clean:
|
|
rm -fr *.o
|
|
|
|
veryclean:
|
|
rm -rf $(BINS)
|