forked from victronenergy/javascript-vnc-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (41 loc) · 1.49 KB
/
Makefile
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
#############################################################################
# Makefile - used by bitbake to prep website for ccgx
#############################################################################
####### Compiler, tools and options
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
DEL_FULL_DIR = rm -rf
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
# mkfile_path = $(abspath $(lastword $(MAKEFILE_LIST)))
# current_dir = $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
# builddir = $(patsubst %/,%,$(dir $(mkfile_path)))-build
# set DESTDIR to default value when not already set
DESTDIR ?= /var/www/javascript-vnc-client
####### Install
all:
# ./buildForCCGX.sh $(builddir)
# clean:
# rm -rf $(builddir)
install:
@$(CHK_DIR_EXISTS) $(DESTDIR) || $(MKDIR) $(DESTDIR)
@$(CHK_DIR_EXISTS) $(DESTDIR)/include || $(MKDIR) $(DESTDIR)/include
@$(CHK_DIR_EXISTS) $(DESTDIR)/styling || $(MKDIR) $(DESTDIR)/styling
@$(CHK_DIR_EXISTS) $(DESTDIR)/scripts || $(MKDIR) $(DESTDIR)/scripts
$(COPY_DIR) index.php $(DESTDIR)
$(COPY_DIR) -R styling/* $(DESTDIR)/styling
$(COPY_DIR) -R scripts/* $(DESTDIR)/scripts
$(COPY_DIR) ext/noVNC/include/* $(DESTDIR)/include
# Configure permissions
chown -R www-data:www-data $(DESTDIR)*