Browse Source

Rename clearBuffer method
Put installation rules in .pro file under linux

semlanik 7 years ago
parent
commit
ad682b791a
3 changed files with 11 additions and 8 deletions
  1. 1 1
      ubx.c
  2. 9 6
      ubxproto.pro
  3. 1 1
      ubxutils.h

+ 1 - 1
ubx.c

@@ -41,7 +41,7 @@ void fletcherChecksum(unsigned char* buffer, int size, unsigned char* checkSumA,
     }
 }
 
-extern void clearBuffer(const UBXMsgBuffer* buffer)
+extern void clearUBXMsgBuffer(const UBXMsgBuffer* buffer)
 {
     free(buffer->data);
 }

+ 9 - 6
ubxproto.pro

@@ -24,14 +24,17 @@ HEADERS +=\
     ubxrxm.h \
     ubxutils.h
 
-header_files.files = $$HEADERS
-header_files.path = $$PREFIX/usr/include
-target.path = $$PREFIX/usr/lib
 OBJECTS_DIR = .obj
 MOC_DIR = .moc
-DEPLOYMENT += header_files target
-INSTALLS += header_files
-INSTALLS += target
+
+linux {
+    header_files.files = $$HEADERS
+    header_files.path = $$PREFIX/usr/include
+    target.path = $$PREFIX/usr/lib
+    DEPLOYMENT += header_files target
+    INSTALLS += header_files
+    INSTALLS += target
+}
 
 win32 {
     LIBS += ws2_32

+ 1 - 1
ubxutils.h

@@ -36,7 +36,7 @@ extern "C"
 
 //Additional API will be replaced with checkMessage(const UBXMsgBuffer* buffer);
 extern void fletcherChecksum(unsigned char* buffer, int size, unsigned char* checkSumA, unsigned char* checkSumB);
-extern void clearBuffer(const UBXMsgBuffer *buffer);
+extern void clearUBXMsgBuffer(const UBXMsgBuffer *buffer);
 #ifdef __cplusplus
 }
 #endif