mirror of
https://github.com/UberGames/RPG-X2.git
synced 2024-11-21 20:11:21 +00:00
Modified makefiles
Use SQL=1 do build with sql support. Use DEBUG=1 do build with debugging symbols. Example: make SQL=1 DEBUG=1 will build with sql support and debugging symbols.
This commit is contained in:
parent
ca521fef64
commit
0fef2e2732
6 changed files with 23 additions and 7 deletions
|
@ -113,7 +113,11 @@ LUAOBJ = \
|
|||
lzio.o
|
||||
|
||||
# do cc for shared library
|
||||
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -o $@ -c $<
|
||||
ifeq ($(DEBUG), 1)
|
||||
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $<
|
||||
else
|
||||
DO_SOCC = $(CC) $(SOCFLAGS) -Wall $(DEFINES) -o $@ -c $<
|
||||
endif
|
||||
# do cc for lua
|
||||
DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
|
||||
|
||||
|
|
|
@ -133,7 +133,11 @@ SQLITE= \
|
|||
sqlite3.o
|
||||
|
||||
# do cc for shared library
|
||||
ifeq ($(DEBUG), 1)
|
||||
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $<
|
||||
else
|
||||
DO_SOCC = $(CC) $(SOCFLAGS) -Wall $(DEFINES) -o $@ -c $<
|
||||
endif
|
||||
# do cc for lua
|
||||
DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
|
||||
|
||||
|
|
|
@ -988,6 +988,7 @@ void QDECL G_PrintfClientAll(const char *fmt, ...);
|
|||
//
|
||||
// g_sql.c
|
||||
//
|
||||
qboolean G_Sql_Init(void);
|
||||
qboolean G_Sql_CreateTables(const char *dbName);
|
||||
void G_Sql_Query(const char *query, const char *dbName, char *res);
|
||||
qboolean G_Sql_UserAdd(const char *dbName, const char *uName, const char *password);
|
||||
|
|
|
@ -25,8 +25,8 @@ extern void QDECL G_PrintfClient( gentity_t *ent, const char *fmt, ...);
|
|||
G_SqlInit
|
||||
===============
|
||||
*/
|
||||
qboolean G_SqlInit(void) {
|
||||
|
||||
qboolean G_Sql_Init(void) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@ qboolean G_SqlInit(void) {
|
|||
Do_Mysql_Hash
|
||||
===============
|
||||
*/
|
||||
static const char *Do_Mysql_Hash(const char *str) {
|
||||
static const char *Do_Sql_Hash(const char *str) {
|
||||
switch(sql_hash.integer) {
|
||||
default:
|
||||
case 0:
|
||||
|
@ -134,7 +134,7 @@ qboolean Do_Sql_CreateTables(const char *dbName) {
|
|||
G_Printf(S_COLOR_RED "SQLITE ERROR: Was unable to create user table\n");
|
||||
return qfalse;
|
||||
}
|
||||
res = sqlite3_prepare_v2(handle, SQL_CREATERIGHTSTABLE, -1 &stmt, 0);
|
||||
res = sqlite3_prepare_v2(handle, SQL_CREATERIGHTSTABLE, -1, &stmt, 0);
|
||||
if(res) {
|
||||
G_Printf(S_COLOR_RED "SQLITE ERROR: Was uanable to create rights table\n");
|
||||
return qfalse;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
|
||||
#ifndef _G_SQL_H_
|
||||
#define _G_SQL_H_
|
||||
|
||||
#define MAX_SQL_RESULT 4096
|
||||
#define SQL_ENABLE_FOREIGN_KEY_CONTRAINTS "PRAGMA foreign_keys = ON;"
|
||||
#define SQL_GET_UID(UNAME) va("SELECT id FROM rpgx_users WHERE username = %s", UNAME)
|
||||
|
@ -49,4 +52,4 @@ typedef enum {
|
|||
SQLF_SHAKE = 1073741824
|
||||
} sql_userflags;
|
||||
|
||||
qboolean G_SqlInit(void);
|
||||
#endif // _G_SQL_H_
|
||||
|
|
|
@ -79,7 +79,11 @@ SOOBJ = \
|
|||
ui_syscalls.o
|
||||
|
||||
# do cc for shared libraries
|
||||
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -o $@ -c $<
|
||||
ifeq ($(DEBUG), 1)
|
||||
DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $<
|
||||
else
|
||||
DO_SOCC = $(CC) $(SOCFLAGS) -Wall $(DEFINES) -o $@ -c $<
|
||||
endif
|
||||
|
||||
build_so: DO_CC=$(DO_SOCC)
|
||||
|
||||
|
|
Loading…
Reference in a new issue