Skip to content

Commit 49899a7

Browse files
authored
Update nomos standalone binary and source (#27)
Signed-off-by: Jiyeong Seok <[email protected]>
1 parent 5d7f9ef commit 49899a7

File tree

18 files changed

+1139
-446
lines changed

18 files changed

+1139
-446
lines changed

src/fosslight_dependency/third_party/nomos/agent/CHECKSTR

100644100755
File mode changed.

src/fosslight_dependency/third_party/nomos/agent/GENSEARCHDATA

100644100755
File mode changed.

src/fosslight_dependency/third_party/nomos/agent/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ GENOBJS = _precheck.o _autodata.o
1818
HDRS = nomos.h $(OBJS:.o=.h) _autodefs.h
1919

2020
#CFLAGS_LOCAL = -DSTANDALONE -g -O2 -Wall -D_FILE_OFFSET_BITS=64
21-
CFLAGS_LOCAL = -DSTANDALONE -Wall -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/json-c
21+
CFLAGS_LOCAL = -DSTANDALONE -Wall -D_FILE_OFFSET_BITS=64 $(shell pkg-config glib-2.0 --cflags) $(shell pkg-config --cflags json-c)
2222

23-
FO_LDFLAGS += -L --static /usr/lib/x86_64-linux-gnu/libglib-2.0.a -L --static /usr/lib/x86_64-linux-gnu/libjson-c.a -lpthread
23+
FO_LDFLAGS += $(shell pkg-config glib-2.0 --libs) $(shell pkg-config --libs json-c) -lpthread -lrt
2424

2525
all: encode $(EXE)
2626

src/fosslight_dependency/third_party/nomos/agent/Makefile.conf

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,20 @@ CXXFOLIB = $(CXXFOLIBDIR)/libfossologyCPP.a
127127
GLIB_CFLAGS := $(shell pkg-config --cflags glib-2.0)
128128
GLIB_LDFLAGS := $(shell pkg-config --libs glib-2.0)
129129

130-
FO_CFLAGS = -I$(PG_INCLUDEDIR) -I$(FOLIBDIR) $(CFLAGS)
131-
FO_LDFLAGS = $(LDFLAGS)
130+
PG_INCLUDEDIR := $(shell pg_config --includedir)
131+
132+
FO_CFLAGS = -I$(PG_INCLUDEDIR) $(GLIB_CFLAGS) -I$(FOLIBDIR) $(CFLAGS)
133+
FO_LDFLAGS = $(GLIB_LDFLAGS) $(LDFLAGS)
132134

133135
FO_CXXFLAGS = -I$(CXXFOLIBDIR) $(FO_CFLAGS) $(CXXFLAGS)
134136
FO_CXXLDFLAGS = -lfossologyCPP -L$(CXXFOLIBDIR) -lstdc++ $(FO_LDFLAGS) \
135137
$(shell pkg-config --libs icu-uc)
136138

137139
# define VERSION and COMMIT_ID
138-
VERSION=`git describe --tags > /dev/null 2>&1 && git describe --tags | head -1 || echo "unknown"`
139-
BRANCH=`git rev-parse --abbrev-ref HEAD > /dev/null 2>&1 && git rev-parse --abbrev-ref HEAD | head -1 || echo "unknown"`
140-
COMMIT_HASH=`git show > /dev/null 2>&1 && git show | head -1 | awk '{print substr($$2,1,6)}' || echo "unknown"`
140+
VERSION_PATTERN = '\([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\)\(-?rc[[:digit:]]+\)?-\([[:digit:]]+\)-[[:alnum:]]*'
141+
VERSION = $(shell git describe --tags > /dev/null 2>&1 && git describe --tags | head -1 | sed -re 's/$(VERSION_PATTERN)/\1.\3\2/' || echo "unknown")
142+
BRANCH=$(shell git rev-parse --abbrev-ref HEAD > /dev/null 2>&1 && git rev-parse --abbrev-ref HEAD | head -1 || echo "unknown")
143+
COMMIT_HASH=$(shell git show > /dev/null 2>&1 && git show | head -1 | awk '{print substr($$2,1,6)}' || echo "unknown")
141144

142145
# Force the VERSION variable to be < 23 chars
143146
override VERSION:= $(shell echo ${VERSION} | cut -b1-23)
@@ -150,6 +153,11 @@ FOWWWDIR = $(FOSRCDIR)/www/ui
150153
# for use when coverage C code
151154
FLAG_COV = -O0 -fprofile-arcs -ftest-coverage
152155

156+
# to run phpunit tests
157+
PHPUNIT = $(FOSRCDIR)/vendor/bin/phpunit
158+
PHPUNIT_CONF = $(FOSRCDIR)/phpunit.xml
159+
PHPUNIT_BOOT = $(FOSRCDIR)/phpunit-bootstrap.php
160+
153161
# to run cunit tets
154162
CUNIT_VERSION = $(shell $(TOP)/utils/cunit-version)
155163

src/fosslight_dependency/third_party/nomos/agent/PRECHECK

100644100755
File mode changed.

0 commit comments

Comments
 (0)