Skip to content

Commit 1a68890

Browse files
committed
Version 2.0.0
Update Makefile
1 parent c883c9f commit 1a68890

File tree

4 files changed

+35
-29
lines changed

4 files changed

+35
-29
lines changed

.gresource.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<gresources>
3+
<gresource prefix="/com/dev47apps/droidcam">
4+
<file>icon2.png</file>
5+
</gresource>
6+
</gresources>

Makefile

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,55 @@
1111
# Example:
1212
# APPINDICATOR=ayatana-appindicator3-0.1 make droidcam
1313

14-
APPINDICATOR ?= appindicator3-0.1
15-
JPEG_DIR ?= /opt/libjpeg-turbo
16-
JPEG_INCLUDE ?= $(JPEG_DIR)/include
17-
JPEG_LIB ?= $(JPEG_DIR)/lib`getconf LONG_BIT`
1814

15+
CC ?= gcc
16+
CFLAGS ?= -Wall -O2
17+
APPINDICATOR ?= appindicator3-0.1
1918

20-
CC = gcc
21-
CFLAGS = -Wall -O2
2219
GTK = `pkg-config --libs --cflags gtk+-3.0` `pkg-config --libs x11`
2320
GTK += `pkg-config --libs --cflags $(APPINDICATOR)`
2421
LIBAV = `pkg-config --libs --cflags libswscale libavutil`
25-
LIBS = -lspeex -lasound -lpthread -lm
26-
JPEG = -I$(JPEG_INCLUDE) $(JPEG_LIB)/libturbojpeg.a
22+
JPEG = `pkg-config --libs --cflags libturbojpeg`
23+
USBMUXD = `pkg-config --libs --cflags libusbmuxd`
24+
LIBS = -lspeex -lasound -lpthread -lm
2725
SRC = src/connection.c src/settings.c src/decoder*.c src/av.c src/usb.c src/queue.c
28-
USBMUXD = -lusbmuxd
2926

3027
ifneq ($(findstring ayatana,$(APPINDICATOR)),)
3128
CFLAGS += -DUSE_AYATANA_APPINDICATOR
3229
endif
3330

34-
3531
all: droidcam-cli droidcam
3632

37-
ifneq "$(RELEASE)" ""
38-
SRC += src/libusbmuxd.a src/libxml2.a src/libplist-2.0.a
33+
ifeq "$(RELEASE)" ""
34+
package:
35+
@echo "usage: RELEASE=2. make package"
36+
37+
else
38+
JPEG =
39+
LIBAV = -L/opt/ffmpeg4/lib -lswscale -lavutil
40+
USBMUXD =
41+
42+
SRC += /opt/libimobiledevice/lib/libusbmuxd.a
43+
SRC += /opt/libimobiledevice/lib/libplist-2.0.a
44+
SRC += /opt/libjpeg-turbo/lib64/libturbojpeg.a
45+
46+
.PHONY: package
3947
package: clean all
4048
zip "droidcam_$(RELEASE).zip" \
4149
LICENSE README* icon2.png \
4250
droidcam* install* uninstall* \
4351
v4l2loopback/*
44-
45-
else
46-
LIBS += $(USBMUXD)
4752
endif
4853

49-
gresource: .gresource.xml icon2.png
50-
glib-compile-resources .gresource.xml --generate-source --target=src/resources.c
54+
#src/resources.c: .gresource.xml icon2.png
55+
# glib-compile-resources .gresource.xml --generate-source --target=src/resources.c
56+
57+
droidcam-cli: LDLIBS += $(LIBAV) $(JPEG) $(USBMUXD) $(LIBS)
58+
droidcam: LDLIBS += $(GTK) $(LIBAV) $(JPEG) $(USBMUXD) $(LIBS)
5159

52-
droidcam-cli: LDLIBS += $(JPEG) $(LIBAV) $(LIBS)
5360
droidcam-cli: src/droidcam-cli.c $(SRC)
5461
$(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
5562

56-
droidcam: LDLIBS += $(GTK) $(JPEG) $(LIBAV) $(LIBS)
5763
droidcam: src/droidcam.c src/resources.c $(SRC)
5864
$(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
5965

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,18 @@ Raspberry-PI instructions can be found here: https://github.com/dev47apps/droidc
1111

1212
## Building
1313

14-
Download and install latest libjpeg-turbo release via
15-
https://github.com/libjpeg-turbo/libjpeg-turbo/releases
16-
17-
The libjpeg-turbo package should go into `/opt/libjpeg-turbo`.
18-
The official binaries (.deb, .rpm) will automatically install into the correct directory.
19-
2014
Install the dependencies
2115

2216
```
2317
Debian/ubuntu:
24-
libavutil-dev libswscale-dev libasound2-dev libspeex-dev libusbmuxd-dev libplist-dev
18+
libavutil-dev libswscale-dev libasound2-dev libspeex-dev libusbmuxd-dev libplist-dev libturbojpeg0-dev
2519
2620
# Only needed for GUI client
2721
libgtk-3-dev libappindicator3-dev
2822
2923
3024
Fedora:
31-
libavutil-free-devel libswscale-free-devel alsa-lib-devel speex-devel libusbmuxd-devel libplist-devel
25+
libavutil-free-devel libswscale-free-devel alsa-lib-devel speex-devel libusbmuxd-devel libplist-devel turbojpeg-devel
3226
3327
# Only needed for GUI client
3428
gtk3-devel libappindicator-gtk3-devel

src/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef _COMMON_H_
1010
#define _COMMON_H_
1111

12-
#define APP_VER_INT 190
13-
#define APP_VER_STR "1.9.0"
12+
#define APP_VER_INT 200
13+
#define APP_VER_STR "2.0.0"
1414

1515
#define MSG_ERROR(str) ShowError("Error",str)
1616
#define MSG_LASTERROR(str) ShowError(str,strerror(errno))

0 commit comments

Comments
 (0)