Pārlūkot izejas kodu

preparations for new naming structure:
+ created an include dir for headers
+ UA_config.h and UA_abbr.h
M fixed file include paths in some existing files .e.g check_stack or example server

Stasik0 11 gadi atpakaļ
vecāks
revīzija
26687e02f3

+ 2 - 1
examples/src/Makefile.am

@@ -1,7 +1,8 @@
 bin_PROGRAMS= $(top_builddir)/bin/exampleServer
 __top_builddir__bin_exampleServer_LDFLAGS = -all-static
+__top_builddir__bin_exampleServer_CFLAGS = -I$(top_builddir)/src -I$(top_builddir)/include
 __top_builddir__bin_exampleServer_SOURCES = opcuaServer.c
-__top_builddir__bin_exampleServer_LDADD= ../../lib/libopen62541.a
+__top_builddir__bin_exampleServer_LDADD= $(top_builddir)/lib/libopen62541.a
 
 #optimization levels depending on debug
 if DEBUG

+ 4 - 4
examples/src/opcuaServer.c

@@ -13,10 +13,10 @@
 
 
 
-#include "../../src/opcua_binaryEncDec.h"
-#include "../../src/opcua_builtInDatatypes.h"
-#include "../../src/opcua_transportLayer.h"
-#include "../../src/opcua_types.h"
+#include "opcua_binaryEncDec.h"
+#include "opcua_builtInDatatypes.h"
+#include "opcua_transportLayer.h"
+#include "opcua_types.h"
 
 #ifdef LINUX
 

+ 7 - 0
include/UA_abbr.h

@@ -0,0 +1,7 @@
+#ifndef UA_ABBR_H_
+#define UA_ABBR_H_
+
+
+
+#endif /* UA_ABBR_H_ */
+

+ 8 - 0
include/UA_config.h

@@ -0,0 +1,8 @@
+#ifndef UA_CONFIG_H_
+#define UA_CONFIG_H_
+
+#TODO: include all other header files
+#include "UA_abbr.h"
+
+
+#endif /* UA_CONFIG_H_ */

+ 1 - 0
src/Makefile.am

@@ -19,6 +19,7 @@ libopen62541_la_SOURCES = opcua_builtInDatatypes.c\
 						opcua_memory.h\
 						opcua_time.h\
 						tcp_layer.h						
+libopen62541_la_CFLAGS = -I $(top_builddir)/include
 
 .PHONY: convenience-link clean-convenience-link
 

+ 2 - 2
tests/Makefile.am

@@ -2,8 +2,8 @@ TESTS = check_stack
 check_PROGRAMS = check_stack
 check_stack_SOURCES = check_stack.c
 
-check_stack_CFLAGS = @CHECK_CFLAGS@
-check_stack_LDADD = $(top_builddir)/src/libopen62541.la @CHECK_LIBS@
+check_stack_CFLAGS = @CHECK_CFLAGS@ -I$(top_builddir)/src -I$(top_builddir)/include
+check_stack_LDADD = $(top_builddir)/lib/libopen62541.a @CHECK_LIBS@
 
 #optimization levels depending on debug
 if DEBUG

+ 4 - 4
tests/check_stack.c

@@ -10,10 +10,10 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "../src/opcua_transportLayer.h"
-#include "../src/opcua_binaryEncDec.h"
-#include "../src/opcua_encodingLayer.h"
-#include "../src/opcua_advancedDatatypes.h"
+#include "opcua_transportLayer.h"
+#include "opcua_binaryEncDec.h"
+#include "opcua_encodingLayer.h"
+#include "opcua_advancedDatatypes.h"
 //#include "check_stdint.h"
 #include "check.h"