eda:driver:sqlite: use libsqlite3 on linux to comply with debian policies (#729)...
authorRejean Loyer <rejean.loyer@gmail.com>
Fri, 30 Mar 2012 02:06:32 +0000 (22:06 -0400)
committerRejean Loyer <rejean.loyer@gmail.com>
Fri, 30 Mar 2012 02:17:51 +0000 (22:17 -0400)
eda/drivers/sqlite/EDASQLite.ec
eda/drivers/sqlite/EDASQLite.epj
eda/drivers/sqlite/Makefile

index 3a0522e..0512af7 100644 (file)
@@ -6,7 +6,11 @@ public import "ecere"
 public import "EDA"
 #endif
 
+#ifdef __linux__
+#include <sqlite3.h>
+#else
 #include "sqlite3.h"
+#endif
 
 static void UnusedFunction()
 {
index 9210119..83e36a8 100644 (file)
@@ -18,7 +18,8 @@
          "Options" : {
             "Libraries" : [
                "pthread",
-               "dl"
+               "dl",
+               "sqlite3"
             ]
          }
       },
       }
    ],
    "Files" : [
-      "sqlite3.c",
-      "sqlite3.h",
+      {
+         "FileName" : "sqlite3.c",
+         "Platforms" : [
+            {
+               "Name" : "linux",
+               "Options" : {
+                  "ExcludeFromBuild" : true
+               }
+            }
+         ]
+      },
+      {
+         "FileName" : "sqlite3.h",
+         "Platforms" : [
+            {
+               "Name" : "linux",
+               "Options" : {
+                  "ExcludeFromBuild" : true
+               }
+            }
+         ]
+      },
       "EDASQLite.ec"
    ],
    "ResourcesPath" : "",
          ]
       }
    ]
-}
\ No newline at end of file
+}
index 405d043..61bc498 100644 (file)
@@ -24,7 +24,7 @@ SONAME =
 endif
 
 OBJECTS = \
-       $(OBJ)sqlite3.o \
+       $(if $(LINUX),,$(OBJ)sqlite3.o) \
        $(OBJ)EDASQLite.o \
        $(OBJ)$(MODULE).main$(O)
 
@@ -38,7 +38,7 @@ IMPORTS = \
        $(OBJ)EDASQLite.imp
 
 SOURCES = \
-       sqlite3.c \
+       $(if $(LINUX),,sqlite3.c) \
        EDASQLite.ec
 
 RESOURCES = \
@@ -79,7 +79,7 @@ endif
 
 ifdef LINUX
 
-LIBS += -lpthread -ldl
+LIBS += -lpthread -ldl -lsqlite3
 
 else
 ifdef OSX