Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MojitOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
MojitOS
Commits
40e443b2
Commit
40e443b2
authored
2 years ago
by
ghuter
Browse files
Options
Downloads
Plain Diff
Merge branch 'alexis_build' into dev
parents
945d4174
1e6746be
Branches
Branches containing commit
No related tags found
2 merge requests
!9
fix sensor example (doc)
,
!5
Add dev name to labels
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.sh
+10
-5
10 additions, 5 deletions
configure.sh
makefile
+30
-11
30 additions, 11 deletions
makefile
with
40 additions
and
16 deletions
configure.sh
+
10
−
5
View file @
40e443b2
...
...
@@ -43,16 +43,16 @@ usage() {
}
ls_sensors
()
{
try
cd
src
[
-d
src
]
||
die
'fatal: the "src" directory does not exit.'
[
-z
"
$hdr_whitelist
"
]
&&
hdr_whitelist
=
'.*'
dprint hdr_blacklist
>
&2
dprint hdr_whitelist
>
&2
ls
-1
*
.h |
grep
-xEv
"(
$hdr_blacklist
)
\.
h"
|
grep
-xE
"(
$hdr_
white
list
)
\.
h
"
|
sed
's/\.h$//'
try find src
-type
f
-name
'
*.h
'
|
sed
's,src/\(.*\)\.h,\1,'
|
grep
-xE
v
"(
$hdr_
black
list
)"
|
grep
-xE
"(
$hdr_whitelist
)"
}
# gen_sensors_h(sensor, nb_sensors)
...
...
@@ -103,6 +103,11 @@ gen_sensors_mk() {
printf
'$(OBJ_DIR)/%s.o '
"
$sensor
"
done
printf
'\n'
for
sensor
in
$sensors
;
do
printf
'$(OBJ_DIR)/%s.o: $(SRC_DIR)/%s.c $(SRC_DIR)/%s.h $(SRC_DIR)/util.h\n'
\
"
$sensor
"
"
$sensor
"
"
$sensor
"
printf
'\t$(CC) $(CFLAGS) -c $< -o $@\n'
done
}
detect_caps
()
{
...
...
This diff is collapsed.
Click to expand it.
makefile
+
30
−
11
View file @
40e443b2
...
...
@@ -7,14 +7,7 @@ BIN_DIR = bin
TESTS_DIR
=
tests
BIN
=
mojitos
CAPTOR_OBJ
=
include
./sensors.mk
OBJ
=
\
$(
CAPTOR_OBJ
)
\
$(
OBJ_DIR
)
/util.o
PREFIX
=
/usr/local
CC
=
gcc
CPPFLAGS
=
-std
=
gnu99
-Wall
-Wextra
-Wpedantic
-Wno-unused-function
-I
./lib
...
...
@@ -23,9 +16,23 @@ LDFLAGS =
ASTYLE
=
astyle
--style
=
kr
-xf
-s4
-k3
-n
-Z
-Q
all
:
$(BIN) man
CAPTOR_OBJ
=
include
./sensors.mk
OBJ
=
\
$(
CAPTOR_OBJ
)
\
$(
OBJ_DIR
)
/util.o
options
:
@
echo
BIN:
$(
BIN
)
@
echo
CC:
$(
CC
)
@
echo
CFLAGS:
$(
CFLAGS
)
@
echo
LDFLAGS:
$(
LDFLAGS
)
@
echo
OBJ:
$(
OBJ
)
$(BIN)
:
$(BIN_DIR) $(OBJ) $(OBJ_DIR)/$(BIN).o
$(
CC
)
$(
LDFLAGS
)
-o
$(
BIN_DIR
)
/
$(
BIN
)
$(
OBJ
)
$(
OBJ_DIR
)
/
$(
BIN
)
.o
...
...
@@ -35,7 +42,7 @@ $(OBJ_DIR)/counters.o: $(SRC_DIR)/counters_option.h
$(OBJ_DIR)/$(BIN).o
:
$(SRC_DIR)/$(BIN).c $(SRC_DIR)/counters_option.h
$(
CC
)
$(
CFLAGS
)
-c
$<
-o
$@
$(OBJ_DIR)/
%
.o
:
$(SRC_DIR)/
%
.c $(SRC_DIR)/
%
.h
$(OBJ_DIR)/
util
.o
:
$(SRC_DIR)/
util
.c $(SRC_DIR)/
util
.h
$(
CC
)
$(
CFLAGS
)
-c
$<
-o
$@
$(SRC_DIR)/counters_option.h
:
$(SRC_DIR)/counters_option.sh
...
...
@@ -74,4 +81,16 @@ man: $(BIN)
'/^USAGE/ { $$0=usage } 1'
\
doc/
$(
BIN
)
.pre.1
>
doc/
$(
BIN
)
.1 2>/dev/null
.PHONY
:
all clean mojitos debug format tests readme man
install
:
$(BIN) man
mkdir
-p
$(
PREFIX
)
/bin
cp
$(
BIN_DIR
)
/
$(
BIN
)
$(
PREFIX
)
/bin/.
chmod
755
$(
PREFIX
)
/bin/
$(
BIN
)
mkdir
-p
$(
PREFIX
)
/share/man/man1
cp
$(
DOC_DIR
)
/
$(
BIN
)
.1
$(
PREFIX
)
/share/man/man1/.
chmod
644
$(
PREFIX
)
/share/man/man1/
$(
BIN
)
.1
uninstall
:
rm
-f
$(
PREFIX
)
/bin/
$(
BIN
)
rm
-f
$(
PREFIX
)
/share/man/man1/
$(
BIN
)
.1
.PHONY
:
all clean mojitos debug format tests readme man install uninstall
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment