Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
EDAF55
C-camera
Commits
c6b3de5e
Commit
c6b3de5e
authored
Nov 08, 2016
by
Sven Gestegård Robertz
Browse files
hack for fake_server on MacOS X, tidy Makefile.fake
parent
251d7d33
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/Makefile.fake
View file @
c6b3de5e
...
...
@@ -3,8 +3,16 @@
# For compiling on PC
.PHONY
:
all
.PHONY
:
all
clean
all
:
fake_server
CPPFLAGS
+=
-DFAKE
-DDISABLE_SANITY_CHECKS
CFLAGS
+=
-DFAKE
-DDISABLE_SANITY_CHECKS
CFLAGS
+=
-Wall
LDLIBS
=
-lpthread
fake_server
:
http_server.c fakecapture.h fakecapture.c camera.h camera.c
$(CC)
-o
$@
-DFAKE
-DDISABLE_SANITY_CHECKS
$^
-lpthread
$(CC)
-o
$@
$(CPPFLAGS)
$(CFLAGS)
$(LDFLAGS)
http_server.c fakecapture.c camera.c
$(LDLIBS)
clean
:
-
rm
fake_server
examples/fakecapture.c
View file @
c6b3de5e
...
...
@@ -9,10 +9,14 @@
static
int
frame_nr
=
START_FRAME
;
#ifdef __MACH__
#define UNUSED_VALUE 1
#define CLOCK_MONOTONIC UNUSED_VALUE
int
clock_gettime
(
int
clk_id
,
struct
timespec
*
t
)
{
struct
timeval
now
;
if
(
gettimeofday
(
&
now
,
NULL
));
return
rv
;
int
res
;
if
((
res
=
gettimeofday
(
&
now
,
NULL
))){
return
res
;
}
t
->
tv_sec
=
now
.
tv_sec
;
t
->
tv_nsec
=
now
.
tv_usec
*
1000
;
return
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment