Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
1.5 KiB

  1. # Copyright (c) 2015-2016 Cryptography Research, Inc.
  2. # Author: Mike Hamburg
  3. # Description: STROBE Makefile. for
  4. CC= gcc
  5. ARMCC= arm-none-eabi-gcc -fstack-usage -DNDEBUG
  6. CFLAGS= -std=c11 -Os -Wall -Wextra -Werror $(XCFLAGS)
  7. ARMLDFLAGS= -lc -specs=rdimon.specs
  8. ARMTARGET= -mcpu=cortex-m4 -mthumb -DSTROBE_SINGLE_THREAD=1
  9. .PHONY: all todo clean size-arm test-arm test-native test-strobe test-connection
  10. all: build/test_x25519 build/test_x25519.arm build/test_strobe
  11. build/timestamp:
  12. mkdir build
  13. touch $@
  14. build/%.arm.o: %.c build/timestamp *.h Makefile
  15. $(ARMCC) $(CFLAGS) $(ARMTARGET) -o $@ -c $<
  16. build/%.o: %.c build/timestamp *.h Makefile
  17. $(CC) $(CFLAGS) -o $@ -c $<
  18. build/test_x25519.arm: build/x25519.arm.o build/test_x25519.arm.o
  19. $(ARMCC) $(ARMTARGET) -o $@ $^ $(ARMLDFLAGS)
  20. build/test_x25519: build/x25519.o build/test_x25519.o
  21. $(CC) $(TARGET) -o $@ $^ $(LDFLAGS)
  22. test-strobe: build/test_strobe
  23. build/test_strobe: build/strobe.o build/x25519.o build/test_strobe.o
  24. $(CC) $(TARGET) -o $@ $^ $(LDFLAGS)
  25. size-arm: build/test_x25519.arm
  26. size build/x25519.arm.o
  27. cat build/x25519.arm.su || true
  28. nm --size build/x25519.arm.o | perl -pe 's/[0-9a-f]+/hex $&/e'
  29. test-arm: size-arm
  30. time ./build/test_x25519.arm
  31. test-native: build/test_x25519
  32. build/test_x25519
  33. test-connection: build/test_strobe
  34. ./$< --keygen > build/keys
  35. sh -c "`head -n 1 build/keys`" > /dev/null &
  36. sleep 1
  37. sh -c "`tail -n 1 build/keys`"
  38. todo::
  39. @egrep --color 'TODO|FIXME|HACK|XXX|(\bBUG\b)|WTF|PERF' *.c *.h arm/*.inc
  40. clean::
  41. rm -fr build release keys