
EXEC = aesperf

CFLAGS += -I$(ROOTDIR)/freeswan/libcrypto/include
CFLAGS += -I$(ROOTDIR)/freeswan/libcrypto/libaes
all: $(EXEC)

$(EXEC): objs.a aesperf.o
	$(CC) $(LDFLAGS) -o $@ aesperf.o objs.a $(LDLIBS)

romfs:
	$(ROMFSINST) /bin/$(EXEC)

clean:
	-rm -rf $(EXEC) *.elf *.gdb *.o objs objs.a aesfunclist

# We build a library of the different versions to allow us to edit the
# aesfunclist file and still link properly
objs.a aesfunclist: aes.c mkobjs
	sh <mkobjs
	$(AR) q objs.a objs/*.o
	$(RANLIB) objs.a

aesperf.o: aesfunclist
