www/Makefile

Sun, 05 Jan 2020 11:42:02 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 05 Jan 2020 11:42:02 +0100
changeset 578
e75ce5bbda73
parent 574
b436e3d8d83a
child 580
9cd6873bda75
permissions
-rw-r--r--

Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.

2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 # Makefile for the bms webserver
341
9c4bc199be9e Added product forum export and changed the export menu.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
2 # Copyright (c) 2018-2019 by M. Broek.
2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 include ../Makefile.global
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5
571
468377312726 Added iSpindel monitor screen design.
Michiel Broek <mbroek@mbse.eu>
parents: 563
diff changeset
6 SRC = cmd_fermenter.php cmd_co2meter.php cmd_ispindel.php config.php.dist crontasks.php \
563
acdd54144838 Added export inventory and profiles in beerxml format. Small fixes in beerxml recipe and product export.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
7 export_equipments.php export_fermentables.php export_hops.php export_mashs.php \
acdd54144838 Added export inventory and profiles in beerxml format. Small fixes in beerxml recipe and product export.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
8 export_miscs.php export_styles.php export_suppliers.php export_waters.php \
acdd54144838 Added export inventory and profiles in beerxml format. Small fixes in beerxml recipe and product export.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
9 export_yeasts.php favicon.ico gen_about.php \
507
17f244137a9b Add refermentation logfile and graph.
Michiel Broek <mbroek@mbse.eu>
parents: 506
diff changeset
10 getbrewlog.php getco2meter.php getco2pressurelog.php getfermentablesources.php \
17f244137a9b Add refermentation logfile and graph.
Michiel Broek <mbroek@mbse.eu>
parents: 506
diff changeset
11 getfermenter.php getfermentlog.php gethopsources.php getmiscsources.php getnode.php \
571
468377312726 Added iSpindel monitor screen design.
Michiel Broek <mbroek@mbse.eu>
parents: 563
diff changeset
12 getwatersources.php getyeastsources.php getispindel.php import_ingredients.php index.php \
173
4cda47269c02 Updated Makefile
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
13 inv_equipments.php inv_fermentables.php inv_hops.php inv_instock.php \
303
98c2afc88780 Added recipe export menu.
Michiel Broek <mbroek@mbse.eu>
parents: 302
diff changeset
14 inv_miscs.php inv_suppliers.php inv_waters.php inv_yeasts.php \
506
8ab0e87d579e Added beer selection in the CO2 meter screen. Added CO2 pressure logging.
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
15 log_brew.php log_co2pressure.php log_fermentation.php \
571
468377312726 Added iSpindel monitor screen design.
Michiel Broek <mbroek@mbse.eu>
parents: 563
diff changeset
16 mon_brewer.php mon_co2meter.php mon_fermenter.php mon_ispindel.php mon_node.php \
302
d0f7b4ab000f Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents: 297
diff changeset
17 prod_archive_code.php prod_archive_date.php prod_archive_name.php prod_beerxml.php \
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents: 466
diff changeset
18 prod_checklist.php prod_divide.php prod_duplicate.php prod_edit.php prod_export.php prod_forum.php \
398
7e8f1a7ddeeb Split the checklist out of prod_print.php into prod_checklist.php
Michiel Broek <mbroek@mbse.eu>
parents: 360
diff changeset
19 prod_impbrew.php prod_inprod.php prod_new.php prod_print.php prod_torecipe.php \
454
f05ced2b5124 Added yeast performance report.
Michiel Broek <mbroek@mbse.eu>
parents: 453
diff changeset
20 prod_r_efficiency.php prod_r_yeast.php prod_r_totals.php \
303
98c2afc88780 Added recipe export menu.
Michiel Broek <mbroek@mbse.eu>
parents: 302
diff changeset
21 profile_fermentation.php profile_mash.php profile_setup.php profile_styles.php \
98c2afc88780 Added recipe export menu.
Michiel Broek <mbroek@mbse.eu>
parents: 302
diff changeset
22 profile_water.php \
360
38d982a42955 Update the Makefile.
Michiel Broek <mbroek@mbse.eu>
parents: 356
diff changeset
23 rec_beerxml.php rec_duplicate.php rec_edit.php rec_export.php rec_forum.php \
38d982a42955 Update the Makefile.
Michiel Broek <mbroek@mbse.eu>
parents: 356
diff changeset
24 rec_import.php rec_main.php rec_new.php rec_print.php rec_toproduct.php \
311
f6fafccd8a6d Added xml import for fermentables, hops, miscs, yeasts and styles. Fixed update IBU calculation in the editor hop popups.
Michiel Broek <mbroek@mbse.eu>
parents: 309
diff changeset
25 upl_brew.php upl_fermentables.php upl_hops.php upl_miscs.php upl_recipe.php \
f6fafccd8a6d Added xml import for fermentables, hops, miscs, yeasts and styles. Fixed update IBU calculation in the editor hop popups.
Michiel Broek <mbroek@mbse.eu>
parents: 309
diff changeset
26 upl_styles.php upl_yeasts.php version.php
5
36387e45a194 Added Makefile install commands
Michiel Broek <mbroek@mbse.eu>
parents: 4
diff changeset
27 SUB = version.php.in images/* css/* jqwidgets/* jqwidgets/styles/* \
10
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents: 5
diff changeset
28 jqwidgets/styles/images/* jqwidgets/globalization/* js/* \
81
aad866b2bcea Fixed extra include file
Michiel Broek <mbroek@mbse.eu>
parents: 36
diff changeset
29 includes/* fpdf/* import/*
2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 OTHER = Makefile
464
fbd2a7cecaaa Fixed unused variables.
Michiel Broek <mbroek@mbse.eu>
parents: 463
diff changeset
31 CSS_FILES = $(filter-out %-min.css,$(wildcard css/*.css css/**/*.css ))
fbd2a7cecaaa Fixed unused variables.
Michiel Broek <mbroek@mbse.eu>
parents: 463
diff changeset
32 YUI_COMPRESSOR = yui-compressor
fbd2a7cecaaa Fixed unused variables.
Michiel Broek <mbroek@mbse.eu>
parents: 463
diff changeset
33 YUI_COMPRESSOR_FLAGS = --charset utf-8 --verbose
463
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
34
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
35 CSS_MINIFIED = $(CSS_FILES:.css=-min.css)
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
36
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
37
2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 #############################################################################
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 .c.o:
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 507
diff changeset
44 all: minify-css
2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46 clean:
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 507
diff changeset
47 rm -f version.php ${CSS_MINIFIED}
2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48
463
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
49 minify-css: $(CSS_FILES) $(CSS_MINIFIED)
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
50
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
51 %-min.css: %.css
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
52 @echo '==> Minifying $<'
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
53 $(YUI_COMPRESSOR) $(YUI_COMPRESSOR_FLAGS) --type css $< >$@
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
54 @echo
0efdafd23753 Switched to compressed javascript and css files using the yui-compressor
Michiel Broek <mbroek@mbse.eu>
parents: 454
diff changeset
55
2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
56 install:
189
6470e5c6a001 In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
57 ${INSTALL} -d -g 314 -o 314 ${PREFIX} ${WWWDIR} ${WWWDIR}/css ${WWWDIR}/fpdf \
6470e5c6a001 In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
58 ${WWWDIR}/fpdf/font \
24
754c56e785c6 Fixed web installation
Michiel Broek <mbroek@mbse.eu>
parents: 23
diff changeset
59 ${WWWDIR}/jqwidgets ${WWWDIR}/js ${WWWDIR}/images/ ${WWWDIR}/includes/
183
a810539dc218 Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents: 178
diff changeset
60 ${INSTALL} -d -g 314 -o 314 -m 0777 ${WWWDIR}/run
194
d202777ebae5 Added design notes for the csv log format from fermenters. In bmsd configuration added the web_root entry. Switched fermenter DLOG messages to store the log in flat csv files instead of the database. This is much faster and the graphs look better.
Michiel Broek <mbroek@mbse.eu>
parents: 189
diff changeset
61 ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log
d202777ebae5 Added design notes for the csv log format from fermenters. In bmsd configuration added the web_root entry. Switched fermenter DLOG messages to store the log in flat csv files instead of the database. This is much faster and the graphs look better.
Michiel Broek <mbroek@mbse.eu>
parents: 189
diff changeset
62 ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/brews
d202777ebae5 Added design notes for the csv log format from fermenters. In bmsd configuration added the web_root entry. Switched fermenter DLOG messages to store the log in flat csv files instead of the database. This is much faster and the graphs look better.
Michiel Broek <mbroek@mbse.eu>
parents: 189
diff changeset
63 ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/fermentation
574
b436e3d8d83a Added init script
Michiel Broek <mbroek@mbse.eu>
parents: 571
diff changeset
64 ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/co2pressure
578
e75ce5bbda73 Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents: 574
diff changeset
65 ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/ispindel
249
96e6c726d563 Fix permissions in the web directories.
Michiel Broek <mbroek@mbse.eu>
parents: 194
diff changeset
66 ${INSTALL} -g 314 -o 314 -m 0644 ${SRC} ${WWWDIR}/
96e6c726d563 Fix permissions in the web directories.
Michiel Broek <mbroek@mbse.eu>
parents: 194
diff changeset
67 ${INSTALL} -g 314 -o 314 -m 0644 version.php ${WWWDIR}/
96e6c726d563 Fix permissions in the web directories.
Michiel Broek <mbroek@mbse.eu>
parents: 194
diff changeset
68 ${INSTALL} -g 314 -o 314 -m 0644 css/* ${WWWDIR}/css/
96e6c726d563 Fix permissions in the web directories.
Michiel Broek <mbroek@mbse.eu>
parents: 194
diff changeset
69 ${INSTALL} -g 314 -o 314 -m 0644 images/* ${WWWDIR}/images/
96e6c726d563 Fix permissions in the web directories.
Michiel Broek <mbroek@mbse.eu>
parents: 194
diff changeset
70 ${INSTALL} -g 314 -o 314 -m 0644 includes/* ${WWWDIR}/includes/
5
36387e45a194 Added Makefile install commands
Michiel Broek <mbroek@mbse.eu>
parents: 4
diff changeset
71 cp -r jqwidgets/* ${WWWDIR}/jqwidgets/
36387e45a194 Added Makefile install commands
Michiel Broek <mbroek@mbse.eu>
parents: 4
diff changeset
72 chown -R 314:314 ${WWWDIR}/jqwidgets
249
96e6c726d563 Fix permissions in the web directories.
Michiel Broek <mbroek@mbse.eu>
parents: 194
diff changeset
73 cp -r -p fpdf/* ${WWWDIR}/fpdf/
189
6470e5c6a001 In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
74 chown -R 314:314 ${WWWDIR}/fpdf
249
96e6c726d563 Fix permissions in the web directories.
Michiel Broek <mbroek@mbse.eu>
parents: 194
diff changeset
75 ${INSTALL} -g 314 -o 314 -m 0644 js/* ${WWWDIR}/js/
2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
76
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77 filelist: Makefile
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 BASE=`pwd`; \
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 BASE=`basename $${BASE}`; \
5
36387e45a194 Added Makefile install commands
Michiel Broek <mbroek@mbse.eu>
parents: 4
diff changeset
80 (for f in ${SRC} ${SUB} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist
2
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
81
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
82 depend:
282e7d2bb28a Initial web server
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83

mercurial