-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
96 lines (71 loc) · 3.88 KB
/
Copy pathMakefile
File metadata and controls
96 lines (71 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
PREFIX = /usr
# When not installing to a custom location append that location
# to PKG_CONFIG_PATH so that pkgconfig can find the libraries installed.
export PKG_CONFIG_PATH := $(if $(PKG_CONFIG_PATH),$(PKG_CONFIG_PATH):$(PREFIX)/lib/pkgconfig/,$(PREFIX)/lib/pkgconfig)
# Make sure wx-config will be found.
export PATH := $(PATH):$(PREFIX)/bin
IGNORE_WARNINGS = -Wno-reorder -Wno-sign-compare -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function -Wno-unknown-pragmas
MKDIR = mkdir -p
CHK_DIR_EXISTS = test -d
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SUDO = `which sudo`
WXWIDGETS_TAG=xlights_2026.04
.NOTPARALLEL:
all: wxwidgets33 cbp2make makefile xCapture
#############################################################################
xCapture: FORCE
@${MAKE} -C xCapture -f xCapture.cbp.mak OBJDIR_LINUX_DEBUG=".objs_debug" linux_release
#############################################################################
debug: makefile xCapture_debug
xCapture_debug:
@${MAKE} -C xCapture -f xCapture.cbp.mak OBJDIR_LINUX_DEBUG=".objs_debug" linux_debug
#############################################################################
clean:
@if test -f xCapture/xCapture.cbp.mak; then \
${MAKE} -C xCapture -f xCapture.cbp.mak OBJDIR_LINUX_DEBUG=".objs_debug" clean; \
$(DEL_FILE) xCapture/xCapture.cbp.mak xCapture/xCapture.cbp.mak.orig; \
fi
#############################################################################
ICON_SIZES = 16x16 32x32 64x64 128x128 256x256
install:
@$(CHK_DIR_EXISTS) $(DESTDIR)/${PREFIX}/bin || $(MKDIR) $(DESTDIR)/${PREFIX}/bin
-$(INSTALL_PROGRAM) -D bin/xCapture $(DESTDIR)/${PREFIX}/bin/xCapture
-$(INSTALL_PROGRAM) -D bin/xcapture.desktop $(DESTDIR)/${PREFIX}/share/applications/xcapture.desktop
$(foreach size, $(ICON_SIZES), install -D -m 644 images/icons/$(size).png $(DESTDIR)/${PREFIX}/share/icons/hicolor/$(size)/apps/xcapture.png ; )
uninstall:
-$(DEL_FILE) $(DESTDIR)/${PREFIX}/bin/xCapture
-$(DEL_FILE) $(DESTDIR)/${PREFIX}/share/applications/xcapture.desktop
$(foreach size, $(ICON_SIZES), $(DEL_FILE) $(DESTDIR)/${PREFIX}/share/icons/hicolor/$(size)/apps/xcapture.png ; )
#############################################################################
wxwidgets33: FORCE
@printf "Checking wxwidgets\n"
@if test -n "`wx-config --version 2>/dev/null`"; then \
echo "wxWidgets already installed: `wx-config --version`"; \
elif test ! -d wxWidgets-$(WXWIDGETS_TAG); then \
echo Downloading wxwidgets; \
git clone --depth=1 --shallow-submodules --recurse-submodules -b $(WXWIDGETS_TAG) https://github.com/xLightsSequencer/wxWidgets wxWidgets-$(WXWIDGETS_TAG); \
cd wxWidgets-$(WXWIDGETS_TAG); \
./configure --enable-cxx11 --with-cxx=17 --enable-std_containers --enable-std_string_conv_in_wxstring --enable-backtrace --enable-exceptions --enable-mediactrl --enable-graphics_ctx --enable-monolithic --disable-sdltest --with-gtk=3 --disable-pcx --disable-iff --without-libtiff --enable-utf8 --enable-utf8only --prefix=$(PREFIX); \
echo Building wxwidgets; \
${MAKE} -j 4 -s; \
echo Installing wxwidgets; \
$(SUDO) ${MAKE} install DESTDIR=$(DESTDIR); \
echo Completed build/install of wxwidgets; \
fi
cbp2make:
@if test -n "`cbp2make --version`"; \
then $(DEL_FILE) xCapture/xCapture.cbp.mak; \
fi
makefile: xCapture/xCapture.cbp.mak
xCapture/xCapture.cbp.mak: xCapture/xCapture.cbp
@cbp2make -in xCapture/xCapture.cbp -cfg cbp2make.cfg -out xCapture/xCapture.cbp.mak \
--with-deps --keep-outdir --keep-objdir
@cp xCapture/xCapture.cbp.mak xCapture/xCapture.cbp.mak.orig
@cat xCapture/xCapture.cbp.mak.orig \
| sed \
-e "s/CFLAGS_LINUX_RELEASE = \(.*\)/CFLAGS_LINUX_RELEASE = \1 $(IGNORE_WARNINGS)/" \
-e "s/OBJDIR_LINUX_DEBUG = \(.*\)/OBJDIR_LINUX_DEBUG = .objs_debug/" \
> xCapture/xCapture.cbp.mak
#############################################################################
FORCE: