Skip to content

Commit

Permalink
Some changes to the compilation process
Browse files Browse the repository at this point in the history
- -rdynamic flag is required to fulfilled missing symbols
- Makefile is located inside the src directory
  • Loading branch information
wberube committed May 22, 2024
1 parent c49e913 commit 406436d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
4 changes: 0 additions & 4 deletions Makefile

This file was deleted.

6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ fi

if [ "$1" = "divinus-musl" ]; then
toolchain cortex_a7_thumb2-gcc13-musl-4_9
make -B CC=$GCC OPT="$OPT"
make -C src -B CC=$GCC OPT="$OPT"
elif [ "$1" = "divinus-muslhf" ]; then
toolchain cortex_a7_thumb2_hf-gcc13-musl-4_9
make -B CC=$GCC OPT="$OPT"
make -C src -B CC=$GCC OPT="$OPT"
elif [ "$1" = "divinus-glibc" ]; then
toolchain cortex_a7_thumb2_hf-gcc13-glibc-4_9
make -B CC=$GCC OPT="$OPT -lm"
make -C src -B CC=$GCC OPT="$OPT -lm"
else
echo "Usage: $0 [divinus-musl|divinus-muslhf|divinus-glibc]"
exit 1
Expand Down
16 changes: 3 additions & 13 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
SRCS := hal/hisi/*_hal.c hal/sstar/*_hal.c hal/config.c hal/support.c hal/tools.c\
mp4/bitbuf.c mp4/moof.c mp4/moov.c mp4/mp4.c mp4/nal.c\
rtsp/ringfifo.c rtsp/rtputils.c rtsp/rtspservice.c rtsp/rtsputils.c\
app_config.c compat.c error.c gpio.c http_post.c jpeg.c main.c night.c server.c video.c
BUILD = $(CC) $(SRCS) -I. -ldl -lm -lpthread -rdynamic $(OPT) -o ../$(or $(TARGET),$@)
SRC := $(shell find ./ -name '*.c')

divinus-musl:
$(BUILD)

divinus-muslhf:
$(BUILD)

divinus-glibc:
$(BUILD)
divinus:
$(CC) $(SRC) -I src -rdynamic $(OPT) -o ../$@

0 comments on commit 406436d

Please sign in to comment.