ithewei 6 éve
szülő
commit
8c9a779ac6
4 módosított fájl, 11 hozzáadás és 11 törlés
  1. 5 4
      Makefile
  2. 2 2
      Makefile.in
  3. 1 2
      h.h
  4. 3 3
      sqlite/db.cpp

+ 5 - 4
Makefile

@@ -39,12 +39,13 @@ httpd: prepare
 	$(MAKEF) TARGET=$@ SRCDIRS=". base utils event http http/server $(TMPDIR)"
 
 webbench: prepare
-	$(MAKEF) TARGET=$@ SRCS="examples/webbench.c"
+	$(MAKEF) TARGET=$@ SRCDIRS="" SRCS="examples/webbench.c"
 
 # curl
-INCDIRS:=". base utils http http/client"
-SRCS:="examples/curl.cpp http/client/http_client.cpp http/http_parser.c http/multipart_parser.c http/http_content.cpp base/hstring.cpp"
+CURL_SRCDIRS := http http/client
+CURL_INCDIRS += base utils http http/client
+CURL_SRCS    += examples/curl.cpp base/hstring.cpp
 curl:
-	$(MAKEF) TARGET=$@ INCDIRS=$(INCDIRS) SRCS=$(SRCS) DEFINES="CURL_STATICLIB" LIBS="curl"
+	$(MAKEF) TARGET=$@ SRCDIRS="$(CURL_SRCDIRS)" INCDIRS="$(CURL_INCDIRS)" SRCS="$(CURL_SRCS)" DEFINES="CURL_STATICLIB" LIBS="curl"
 
 .PHONY: clean prepare test client server curl httpd webbench

+ 2 - 2
Makefile.in

@@ -113,11 +113,11 @@ LDFLAGS += $(addprefix -L, $(LIBDIRS))
 LDFLAGS += $(addprefix -l, $(LIBS))
 
 ifeq ($(OS), Windows)
-	LDFLAGS += -Wl,-Bdynamic -lwinmm -liphlpapi -lws2_32
+	LDFLAGS += -lwinmm -liphlpapi -lws2_32
 	LDFLAGS += -Wl,-Bstatic -lstdc++ -lpthread -lm
 else
 ifeq ($(OS), Android)
-	LDFLAGS += -Wl,-Bdynamic -lstdc++ -lm -llog
+	LDFLAGS += -lstdc++ -lm -llog
 else
 	LDFLAGS += -lstdc++ -lpthread -lm
 endif

+ 1 - 2
h.h

@@ -19,12 +19,11 @@
 #include "herr.h"
 #include "hlog.h"
 #include "hmutex.h"
+#include "hsocket.h"
 
 // cpp
 #ifdef __cplusplus
 #include "hstring.h"
-#include "hsocket.h"
-
 #include "hvar.h"
 #include "hobj.h"
 #include "hgui.h"

+ 3 - 3
sqlite/db.cpp

@@ -27,7 +27,7 @@ int db_close(HDB* phdb) {
 
 int db_exec(HDB hdb, const char* sql) {
     char *errmsg;
-    printf("sql: %s\n", sql);
+    //printf("sql: %s\n", sql);
     if (sqlite3_exec(hdb, sql, NULL, NULL, &errmsg) != SQLITE_OK) {
         fprintf(stderr, "sqlite3_exec sql: %s err: %s\n", sql, errmsg);
         return SQL_ERR;
@@ -39,7 +39,7 @@ int db_exec_with_result(HDB hdb, const char* sql, DBTable* table) {
     int row, col;
     char **results;
     char *errmsg;
-    printf("sql: %s\n", sql);
+    //printf("sql: %s\n", sql);
     if (sqlite3_get_table(hdb, sql, &results, &row, &col, &errmsg) != SQLITE_OK) {
         fprintf(stderr, "sqlite3_get_table sql: %s err: %s\n", sql, errmsg);
         return SQL_ERR;
@@ -60,7 +60,7 @@ int db_exec_with_result(HDB hdb, const char* sql, DBTable* table) {
 
 int db_exec_cb(HDB hdb, const char* sql, db_callback cb, void* userdata) {
     char *errmsg;
-    printf("sql: %s\n", sql);
+    //printf("sql: %s\n", sql);
     if (sqlite3_exec(hdb, sql, cb, userdata, &errmsg) != SQLITE_OK) {
         fprintf(stderr, "sqlite3_exec sql: %s err: %s\n", sql, errmsg);
         return SQL_ERR;