Skip to content

Commit 19b153a

Browse files
committed
Updated sources to latest xutils
1 parent f4f85e1 commit 19b153a

File tree

6 files changed

+21
-16
lines changed

6 files changed

+21
-16
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# https://github.com/kala13x/smake #
44
####################################
55

6-
CFLAGS = -g -O2 -Wall
6+
CFLAGS = -O2 -Wall -Wextra -pedantic -I. -I./xutils/src/ -I./xutils/src/crypt/ -I./xutils/src/data/ -I./xutils/src/net/ -I./xutils/src/sys/
77
CFLAGS += -I./src -I./xutils/build/include
8-
LD_LIBS = ./xutils/build/lib/libxutils.a
8+
LD_LIBS = ./xutils/build/libxutils.a
99
LIBS = -lpthread -lm
1010
NAME = smake
1111
ODIR = ./obj
@@ -23,7 +23,7 @@ VPATH = ./src
2323

2424
.c.$(OBJ):
2525
@test -d $(ODIR) || mkdir -p $(ODIR)
26-
$(CC) $(CFLAGS) -c -o $(ODIR)/$@ $< $(LIBS)
26+
$(CC) $(CFLAGS) -c -o $(ODIR)/$@ $< $(LIBS)
2727

2828
$(NAME):$(OBJS)
2929
$(CC) $(CFLAGS) -o $(ODIR)/$(NAME) $(OBJECTS) $(LD_LIBS) $(LIBS)

smake.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"build": {
3-
"flags": "-g -O2 -Wall",
4-
"libs": "-lpthread",
5-
"ldLibs": "./xutils/build/lib/libxutils.a",
3+
"flags": "-O2 -Wall -Wextra -pedantic -I./xutils/src/ -I./xutils/src/crypt/ -I./xutils/src/data/ -I./xutils/src/net/ -I./xutils/src/sys/",
4+
"libs": " -lpthread -lm",
5+
"ldLibs": "./xutils/build/libxutils.a",
66
"outputDir": "./obj",
77
"overwrite": true,
88
"name": "smake",

src/cfg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ xbool_t SMake_SerializeIncludes(xarray_t *pArr, const char *pDlmt, char *pOutput
5252
for (i = 0; i < nCount; i++)
5353
{
5454
const char *pData = (const char*)XArray_GetData(pArr, i);
55-
if (!xstrused(pData) || xstrcmp(pData, "./") || xstrcmp(pData, ".") ) continue;
55+
if (!xstrused(pData)) continue;
5656

5757
if (!bStarted) bStarted = XTRUE;
5858
else if (pDlmt) nAvail = xstrncatf(pOutput, nAvail, "%s", pDlmt);

src/find.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020

2121
int SMake_SearchCb(xfile_search_t *pSearch, xfile_entry_t *pEntry, const char *pMsg)
2222
{
23-
XSYNC_ATOMIC_SET(pSearch->pInterrupted, XTRUE);
23+
XSYNC_ATOMIC_SET(pSearch->pInterrupted, XTRUE);\
24+
(void)pEntry;
25+
(void)pMsg;
2426
return XSTDOK;
2527
}
2628

@@ -95,6 +97,7 @@ XSTATUS SMake_FindLibs(smake_ctx_t *pCtx, const smake_find_t *pFind)
9597
if (nStatus != XSTDOK) break;
9698
}
9799

100+
(void)pCtx;
98101
XArray_Destroy(pLibs);
99102
return nStatus;
100103
}

src/make.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ int SMake_CompareName(const void *pData1, const void *pData2, void *pCtx)
344344
SMakeFile *pObj1 = (SMakeFile*)pFirst->pData;
345345
SMakeFile *pObj2 = (SMakeFile*)pSecond->pData;
346346

347+
(void)pCtx;
347348
return strcmp(pObj1->sName, pObj2->sName);
348349
}
349350

@@ -355,6 +356,7 @@ int SMake_CompareLen(const void *pData1, const void *pData2, void *pCtx)
355356
const char *pStr1 = (const char*)pFirst->pData;
356357
const char *pStr2 = (const char*)pSecond->pData;
357358

359+
(void)pCtx;
358360
return strlen(pStr1) > strlen(pStr2);
359361
}
360362

src/stdinc.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
#define __CMAKE_STDINC_H__
1212

1313
/* libxutils includes */
14-
#include "xutils/xstd.h"
15-
#include "xutils/array.h"
16-
#include "xutils/xjson.h"
17-
#include "xutils/xstr.h"
18-
#include "xutils/xlog.h"
19-
#include "xutils/xcli.h"
20-
#include "xutils/xfs.h"
21-
#include "xutils/map.h"
14+
#include "xutils/src/xstd.h"
15+
#include "xutils/src/data/array.h"
16+
#include "xutils/src/data/xjson.h"
17+
#include "xutils/src/data/xstr.h"
18+
#include "xutils/src/data/map.h"
19+
#include "xutils/src/sys/xlog.h"
20+
#include "xutils/src/sys/xcli.h"
21+
#include "xutils/src/sys/xfs.h"
2222

2323
#endif /* __CMAKE_STDINC_H__ */

0 commit comments

Comments
 (0)