Skip to content

Commit

Permalink
Force une compilation statique
Browse files Browse the repository at this point in the history
  • Loading branch information
Churros98 committed Dec 22, 2024
1 parent 00d95d0 commit 5df127c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions pkg/docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ RUN apk add --no-cache \
libbsd-dev \
libgpiod-dev

RUN ls -l /usr/lib/

WORKDIR /build/ustreamer/
COPY . .
RUN make -j5 WITH_GPIO=1
Expand Down
15 changes: 10 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ _USTR = ustreamer.bin
_DUMP = ustreamer-dump.bin
_V4P = ustreamer-v4p.bin

_CFLAGS = -MD -c -std=c17 -Wall -Wextra -D_GNU_SOURCE $(CFLAGS)

_USTR_LDFLAGS = -static $(LDFLAGS) -lm -ljpeg -pthread -lrt -latomic -levent -levent_pthreads
_DUMP_LDFLAGS = -static $(LDFLAGS) -lm -ljpeg -pthread -lrt -latomic
_V4P_LDFLAGS = -static $(LDFLAGS) -lm -ljpeg -pthread -lrt -latomic
_CFLAGS = -MD -c -std=c17 -Wall -Wextra -D_GNU_SOURCE $(CFLAGS) \
$(shell pkg-config --cflags libjpeg) \
$(shell pkg-config --cflags libevent)

_COMMON_LIBS = -static $(shell pkg-config --libs libjpeg) -lm -pthread -lrt -latomic
_USTR_LDFLAGS = $(LDFLAGS) $(_COMMON_LIBS) \
$(shell pkg-config --libs libevent) \
$(shell pkg-config --libs libevent_pthreads)
_DUMP_LDFLAGS = $(LDFLAGS) $(_COMMON_LIBS)
_V4P_LDFLAGS = $(LDFLAGS) $(_COMMON_LIBS)

_USTR_SRCS = $(shell ls \
libs/*.c \
Expand Down

0 comments on commit 5df127c

Please sign in to comment.