fixed Windows build using makefiles; Windows build switched to OpenSSL 1.1.0
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 16 Aug 2017 15:55:22 +0000 (18:55 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 16 Aug 2017 15:55:22 +0000 (18:55 +0300)
Makefile.inc.w32
build/msvc_setenv_x64.cmd
build/msvc_setenv_x86.cmd
src/agent/libnxagent/Makefile.w32
src/agent/subagents/Makefile.w32
src/agent/subagents/lorawan/Makefile.w32
src/agent/subagents/mqtt/Makefile.am
src/agent/subagents/mqtt/Makefile.w32 [new file with mode: 0644]
src/libnetxms/Makefile.w32
src/server/core/Makefile.w32

index 7d369db..6d38264 100644 (file)
@@ -42,6 +42,9 @@ CURL_BASE = C:\SDK\cURL
 !ifndef JDK_BASE
 JDK_BASE = C:\Program Files\Java\jdk1.8.0_121
 !endif
+!ifndef LIBMOSQUITTO_BASE
+LIBMOSQUITTO_BASE = C:\SDK\libmosquitto
+!endif
 
 # Binaries directory
 NETXMS_LIBDIR = $(NETXMS_BASE)\bin\$(OBJDIR)
@@ -82,6 +85,7 @@ CPPFLAGS = $(CPPFLAGS) /MD /O2 /Gd /EHs- /GR- \
        /I "$(NETXMS_BASE)\build" \
        /I "$(CURL_BASE)\$(ARCH)\include" \
        /I "$(OPENSSL_BASE)\$(ARCH)\include" \
+       /I "$(LIBMOSQUITTO_BASE)\include" \
        /D_MT /DUNICODE
 
 # Common linker flags
@@ -89,7 +93,8 @@ MANIFEST = $(TARGET).intermediate.manifest
 LDFLAGS = $(LDFLAGS) /SUBSYSTEM:CONSOLE /MACHINE:$(ARCH) /MANIFESTFILE:$(MANIFEST) \
        /LIBPATH:"$(NETXMS_LIBDIR)" \
        /LIBPATH:"$(CURL_BASE)\$(ARCH)\lib" \
-       /LIBPATH:"$(OPENSSL_BASE)\$(ARCH)\lib"
+       /LIBPATH:"$(OPENSSL_BASE)\$(ARCH)\lib" \
+       /LIBPATH:"$(LIBMOSQUITTO_BASE)\$(ARCH)\lib"
        
 # Common headers
 HEADERS = $(HEADERS) \
@@ -114,7 +119,7 @@ HEADERS = $(HEADERS) \
        $(NETXMS_BASE)\include\uuid.h
 
 # Common libraries
-LIBS = $(LIBS) ssleay32.lib libeay32.lib uuid.lib kernel32.lib user32.lib advapi32.lib shell32.lib
+LIBS = $(LIBS) libssl.lib libcrypto.lib uuid.lib kernel32.lib user32.lib advapi32.lib shell32.lib
 
 # Prepare list of object files 
 __sources = $(SOURCES:.cpp=.obj)
index a5b7883..4eec358 100644 (file)
@@ -1,4 +1,5 @@
 @echo off
+set ARCH=x64
 set PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;C:\SDK\Windows 7 SDK\Bin\x64;%PATH%
 set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;C:\SDK\Windows 7 SDK\Include;C:\SDK\WINDDK\inc\wnet;%JAVA_HOME%\include;%JAVA_HOME%\include\win32
 set LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;C:\SDK\Windows 7 SDK\Lib\x64;C:\SDK\WINDDK\lib\wnet\amd64
index 73eb4ed..9163202 100644 (file)
@@ -1,4 +1,5 @@
 @echo off
+set ARCH=x86
 set PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\SDK\Windows 7 SDK\Bin;%PATH%
 set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;C:\SDK\Windows 7 SDK\Include;C:\SDK\WINDDK\inc\wnet;%JAVA_HOME%\include;%JAVA_HOME%\include\win32
 set LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;C:\SDK\Windows 7 SDK\Lib;C:\SDK\WINDDK\lib\wnet\i386
index 9d35b1b..8faba54 100644 (file)
@@ -1,6 +1,6 @@
 TARGET = libnxagent.dll
 TYPE = dll
-SOURCES = bridge.cpp cmdexec.cpp dfile_info.cpp main.cpp registry.cpp tools.cpp
+SOURCES = bridge.cpp cmdexec.cpp dfile_info.cpp lora_device_data.cpp main.cpp registry.cpp tools.cpp
 
 CPPFLAGS = /DLIBNXAGENT_EXPORTS
 LIBS = libnxdb.lib libnetxms.lib ws2_32.lib
index ac505c3..13516f8 100644 (file)
@@ -1,5 +1,5 @@
 SUBDIRS = db2 dbquery devemu ecs filemgr gps informix java jmx logwatch \
-          mysql netsvc odbcquery oracle ping portCheck sms ubntlw ups \
-          winnt winperf wmi
+          lorawan mqtt mysql netsvc odbcquery oracle ping portCheck sms \
+                 ubntlw ups winnt winperf wmi
 
 include ..\..\..\Makefile.inc.w32
index cfddab3..f599deb 100644 (file)
@@ -2,6 +2,6 @@ TARGET = lorawan.nsm
 TYPE = nsm
 SOURCES = commproc.cpp lslink.cpp main.cpp mqtt_client.cpp
 
-LIBS = libnxagent.lib libnetxms.lib libcurl.lib libmosquitto.lib
+LIBS = libnxagent.lib libnxdb.lib libnxmb.lib libnetxms.lib libcurl.lib libmosquitto.lib jansson.lib
          
 include ..\..\..\..\Makefile.inc.w32
index 6a12e08..175d219 100644 (file)
@@ -6,7 +6,7 @@ mqtt_la_CPPFLAGS=-I@top_srcdir@/include @MQTT_CPPFLAGS@
 mqtt_la_LDFLAGS = -module -avoid-version -export-symbols ../subagent.sym @MQTT_LDFLAGS@
 mqtt_la_LIBADD = ../../libnxagent/libnxagent.la ../../../libnetxms/libnetxms.la @MQTT_LIBS@
 
-EXTRA_DIST = mqtt_subagent.h
+EXTRA_DIST = Makefile.w32 mqtt_subagent.h
 
 if !STATIC_BUILD
 install-exec-hook:
diff --git a/src/agent/subagents/mqtt/Makefile.w32 b/src/agent/subagents/mqtt/Makefile.w32
new file mode 100644 (file)
index 0000000..4a0c286
--- /dev/null
@@ -0,0 +1,7 @@
+TARGET = mqtt.nsm
+TYPE = nsm
+SOURCES = broker.cpp main.cpp topic.cpp
+
+LIBS = libnxagent.lib libnetxms.lib libtre.lib libmosquitto.lib
+         
+include ..\..\..\..\Makefile.inc.w32
index be9dca8..7de2bad 100644 (file)
@@ -3,8 +3,8 @@ TYPE = dll
 SOURCES = array.cpp base64.cpp bytestream.cpp cc_mb.cpp cc_ucs2.cpp \
        cc_ucs4.cpp cc_utf8.cpp cch.cpp config.cpp crypto.cpp diff.cpp \
        dir.cpp dirw.cpp dload.cpp geolocation.cpp getopt.c hash.cpp \
-       hashmapbase.cpp ice.c icmp.cpp \
-       inetaddr.cpp log.cpp lz4.c main.cpp md5.cpp message.cpp \
+       hashmapbase.cpp ice.c icmp.cpp inetaddr.cpp log.cpp \
+       lz4.c macaddr.cpp main.cpp md5.cpp message.cpp \
        msgrecv.cpp msgwq.cpp net.cpp nxcp.cpp pa.cpp \
        qsort.c queue.cpp rbuffer.cpp rwlock.cpp scandir.c seh.cpp \
        serial.cpp sha1.cpp sha2.cpp \
index 7efe256..0895110 100644 (file)
@@ -25,7 +25,7 @@ SOURCES =  accesspoint.cpp acl.cpp actions.cpp addrlist.cpp \
        nxsl_classes.cpp nxslext.cpp objects.cpp objtools.cpp package.cpp \
        pds.cpp poll.cpp ps.cpp rack.cpp radius.cpp \
        reporting.cpp rootobj.cpp schedule.cpp script.cpp \
-       session.cpp slmcheck.cpp smclp.cpp \
+       sensor.cpp session.cpp slmcheck.cpp smclp.cpp \
        sms.cpp snmp.cpp snmptrap.cpp stp.cpp subnet.cpp summary_email.cpp \
        svccontainer.cpp swpkg.cpp syncer.cpp syslogd.cpp \
        template.cpp tools.cpp tracert.cpp tunnel.cpp \