Skip to content

Commit

Permalink
Patch Krypton for ESP
Browse files Browse the repository at this point in the history
    PUBLISHED_FROM=59ea7441e881d78c5f93725c1e3a67034d4456bd
  • Loading branch information
Deomid Ryabkov authored and rojer committed Aug 23, 2015
1 parent 6e678a2 commit baa1783
Show file tree
Hide file tree
Showing 15 changed files with 389 additions and 220 deletions.
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ endif
all: tests format

krypton.c: $(HEADERS) $(SOURCES) Makefile
cat openssl/ssl.h $(HEADERS) $(SOURCES) | sed -E "/#include .*(ssl.h|`echo $(HEADERS) | sed -e 's,src/,,g' -e 's, ,|,g'`)/d" > $@
@echo "AMALGAMATING\tkrypton.c"
@cp krypton.h $@; \
for f in $(HEADERS) $(SOURCES); do \
echo >> $@; \
echo "/* === `basename $$f` === */" >> $@; \
sed -E "/#include .*(ssl.h|`echo $(HEADERS) | sed -e 's,src/,,g' -e 's, ,|,g'`)/d" $$f >> $@; \
done

tests: openssl-tests krypton-tests

Expand All @@ -43,8 +49,13 @@ sv-test-krypton: test/sv-test.c krypton.c
cl-test-krypton: test/cl-test.c krypton.c
$(CC) $(CFLAGS) -o cl-test-krypton test/cl-test.c krypton.c

vc6: krypton.c
wine cl -c $(SOURCES) -Isrc -DNOT_AMALGAMATED
win-test: krypton.c
ifndef VC6_DIR
$(error Please set VC6_DIR)
endif
Include=$(VC6_DIR)/include Lib=$(VC6_DIR)/lib \
wine $(VC6_DIR)/bin/cl \
krypton.c test/win-test.c

format:
@find . -name "*.[ch]" | xargs $(CLANG_FORMAT) -i
Expand Down
Loading

0 comments on commit baa1783

Please sign in to comment.