--- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ FLAGS = -O3 -DLOW_VERSION="\"`git show -s --format=%cd --date=format:%Y%m%d`_`git rev-parse --short HEAD`\"" C = gcc -CFLAGS = $(FLAGS) -Isrc -Iapp -Ideps/duktape/src-low -Ideps/mbedtls/include -Ideps/mbedtls/crypto/include +CFLAGS = $(FLAGS) -Isrc -Iapp -Ideps/duktape/src-low CXX = g++ -CXXFLAGS = $(CXXFLAGS_SERV) $(FLAGS) -Isrc -Iapp -Ideps/duktape/src-low -Ideps/mbedtls/include -Ideps/mbedtls/crypto/include -Ideps/open62541/build/src_generated -Ideps/open62541/include -Ideps/open62541/arch -Ideps/open62541/plugins/include -Ideps/open62541/src/client -Ideps/open62541/deps -Ideps/open62541/src --std=c++11 +CXXFLAGS = $(CXXFLAGS_SERV) $(FLAGS) -Isrc -Iapp -Ideps/duktape/src-low -Ideps/open62541/build/src_generated -Ideps/open62541/include -Ideps/open62541/arch -Ideps/open62541/plugins/include -Ideps/open62541/src/client -Ideps/open62541/deps -Ideps/open62541/src --std=c++11 LD = g++ -LDFLAGS = $(FLAGS) -lm -ldl -lpthread -lcares deps/open62541/build/bin/libopen62541.a -lresolv +LDFLAGS = $(FLAGS) -lm -ldl -lpthread -lcares -lmbedcrypto -lmbedtls -lmbedx509 deps/open62541/build/bin/libopen62541.a -lresolv OBJECTS_LOW = \ app/main.o \ @@ -52,12 +52,11 @@ clean: rm -rf */*.o */*.d bin/* deps/duktape/src-low lib lib_js/build node_modules util/dukc test/duk_crash - cd deps/mbedtls && make clean cd deps/open62541 && rm -rf build -bin/low: $(OBJECTS) $(OBJECTS_LOW) deps/mbedtls/programs/test/benchmark +bin/low: $(OBJECTS) $(OBJECTS_LOW) mkdir -p bin - $(LD) -o bin/low deps/mbedtls/library/*.o deps/mbedtls/crypto/library/*.o $(OBJECTS) $(OBJECTS_LOW) $(LDFLAGS) + $(LD) -o bin/low $(OBJECTS) $(OBJECTS_LOW) $(LDFLAGS) obj_lowjs_serv: $(OBJECTS) $(OBJECTS_LOW) deps/mbedtls/programs/test/benchmark util/dukc @@ -115,9 +114,6 @@ -DDUK_USE_SECTION_B \ -DDUK_USE_CPP_EXCEPTIONS -deps/mbedtls/programs/test/benchmark: - cd deps/mbedtls && make - deps/open62541/build/bin/libopen62541.a: cd deps/open62541 && rm -rf build && mkdir build cd deps/open62541/build && cmake ..