2011-10-29 14:22:17 +00:00
|
|
|
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`
|
2011-11-06 01:49:13 +00:00
|
|
|
BINS=elftosb sbtoelf sbloader
|
2011-10-29 14:22:17 +00:00
|
|
|
|
2011-11-06 01:49:13 +00:00
|
|
|
all: $(BINS)
|
2010-11-28 10:53:01 +00:00
|
|
|
|
2011-10-29 14:22:17 +00:00
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2011-10-29 17:01:47 +00:00
|
|
|
sbtoelf: sbtoelf.o crc.o crypto.o aes128.o sha1.o elf.o misc.o sb.o
|
2011-10-29 17:09:43 +00:00
|
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
2010-11-28 10:53:01 +00:00
|
|
|
|
2011-10-29 17:01:47 +00:00
|
|
|
elftosb: elftosb.o crc.o crypto.o aes128.o sha1.o elf.o dbparser.o misc.o sb.o
|
2011-10-29 17:09:43 +00:00
|
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
2010-11-28 10:53:01 +00:00
|
|
|
|
2011-11-06 01:49:13 +00:00
|
|
|
sbloader: sbloader.o
|
|
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
|
|
|
|
2010-11-28 10:53:01 +00:00
|
|
|
clean:
|
2011-10-29 14:22:17 +00:00
|
|
|
rm -fr *.o
|
|
|
|
|
|
|
|
veryclean:
|
2011-11-06 01:49:13 +00:00
|
|
|
rm -rf $(BINS)
|