2012-04-23 09:18:34 +00:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
CPPFLAGS = -I. $(ccan_includes)
|
|
|
|
CFLAGS = -Wall -Werror -Wextra -ggdb --std=c99
|
|
|
|
LDFLAGS = -fwhole-program
|
|
|
|
|
2012-05-12 16:45:22 +00:00
|
|
|
sbsign_objs = sbsign.o idc.o image.o
|
2012-04-23 09:18:34 +00:00
|
|
|
sbverify_objs = sbverify.o image.o
|
|
|
|
libs = -lbfd -lcrypto
|
|
|
|
|
|
|
|
ccan_objs = lib/ccan/libccan.a
|
|
|
|
ccan_includes = -I./lib/ccan
|
|
|
|
|
2012-05-12 16:45:22 +00:00
|
|
|
all: sbsign sbverify
|
2012-04-23 09:18:34 +00:00
|
|
|
|
2012-05-12 16:45:22 +00:00
|
|
|
sbsign: $(sbsign_objs) $(ccan_objs)
|
2012-04-23 09:18:34 +00:00
|
|
|
$(LINK.o) -o $@ $^ $(libs)
|
|
|
|
|
|
|
|
sbverify: $(sbverify_objs) $(ccan_objs)
|
|
|
|
$(LINK.o) -o $@ $^ $(libs)
|
|
|
|
|
|
|
|
gen-keyfiles: gen-keyfiles.o $(ccan_objs)
|
|
|
|
$(LINK.o) -o $@ $^ $(libs)
|
|
|
|
gen-keyfiles: libs = -luuid
|
|
|
|
|
|
|
|
$(ccan_objs):
|
|
|
|
cd $(@D) && $(MAKE)
|
|
|
|
|
|
|
|
clean:
|
2012-05-12 16:45:22 +00:00
|
|
|
rm -f sbsign
|
2012-04-23 09:18:34 +00:00
|
|
|
rm -f *.o
|