2011-10-29 14:22:17 +00:00
|
|
|
DEFINES=-DCRYPTO_LIBUSB
|
|
|
|
CC=gcc
|
|
|
|
LD=gcc
|
2013-02-16 19:46:30 +00:00
|
|
|
CFLAGS=-O3 -g -std=c99 -W -Wall `pkg-config --cflags libusb-1.0` $(DEFINES)
|
2011-10-29 14:22:17 +00:00
|
|
|
LDFLAGS=`pkg-config --libs libusb-1.0`
|
2012-12-16 20:22:15 +00:00
|
|
|
BINS=elftosb sbtoelf sbloader rsrctool elftosb1
|
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 $@ $<
|
|
|
|
|
2012-11-26 22:54:44 +00:00
|
|
|
sbtoelf: sbtoelf.o crc.o crypto.o aes128.o sha1.o xorcrypt.o elf.o misc.o sb.o sb1.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
|
|
|
|
2012-12-16 20:22:15 +00:00
|
|
|
elftosb1: elftosb1.o xorcrypt.o elf.o misc.o sb1.o
|
|
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
|
|
|
|
2011-11-06 01:49:13 +00:00
|
|
|
sbloader: sbloader.o
|
|
|
|
$(LD) -o $@ $^ $(LDFLAGS)
|
|
|
|
|
2012-11-29 16:27:34 +00:00
|
|
|
rsrctool: rsrctool.o rsrc.o misc.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)
|