Line 1... |
Line 1... |
1 |
# $Id: Makefile 197 2024-09-29 07:13:35Z nishi $
|
1 |
# $Id: Makefile 217 2024-10-02 19:50:16Z nishi $
|
2 |
|
2 |
|
3 |
PWD = `pwd`
|
3 |
PWD = `pwd`
|
4 |
PLATFORM = generic
|
4 |
PLATFORM = generic
|
5 |
PREFIX = /usr/local
|
5 |
PREFIX = /usr/local
|
6 |
MODULE = ./Module
|
6 |
MODULE = ./Module
|
Line 30... |
Line 30... |
30 |
|
30 |
|
31 |
./Common::
|
31 |
./Common::
|
32 |
$(MAKE) -C $@ $(FLAGS)
|
32 |
$(MAKE) -C $@ $(FLAGS)
|
33 |
|
33 |
|
34 |
./README: ./README.tmpl ./Server/tw_version.h
|
34 |
./README: ./README.tmpl ./Server/tw_version.h
|
35 |
sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed -E 's/^"//g'`/g" ./README.tmpl > $@
|
35 |
sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@
|
36 |
|
36 |
|
37 |
install: all ./Tool/genconf ./Tool/itworks
|
37 |
install: all ./Tool/genconf ./Tool/itworks
|
38 |
mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www
|
38 |
mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www
|
39 |
if [ ! -e $(DESTDIR)$(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi so > $(DESTDIR)$(PREFIX)/etc/tewi.conf || ( rm $(DESTDIR)$(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi
|
39 |
if [ ! -e $(DESTDIR)$(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi so > $(DESTDIR)$(PREFIX)/etc/tewi.conf || ( rm $(DESTDIR)$(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi
|
40 |
if [ ! -e $(DESTDIR)$(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(DESTDIR)$(PREFIX)/www/index.html || ( rm $(DESTDIR)$(PREFIX)/www/index.html ; exit 1 ) ) ; fi
|
40 |
if [ ! -e $(DESTDIR)$(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(DESTDIR)$(PREFIX)/www/index.html || ( rm $(DESTDIR)$(PREFIX)/www/index.html ; exit 1 ) ) ; fi
|
Line 44... |
Line 44... |
44 |
|
44 |
|
45 |
format:
|
45 |
format:
|
46 |
clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
|
46 |
clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
|
47 |
|
47 |
|
48 |
get-version:
|
48 |
get-version:
|
49 |
@grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed -E 's/^"//g'
|
49 |
@grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed 's/^"//g'
|
50 |
|
50 |
|
51 |
clean:
|
51 |
clean:
|
52 |
$(MAKE) -C ./Server $(FLAGS) clean
|
52 |
$(MAKE) -C ./Server $(FLAGS) clean
|
53 |
$(MAKE) -C ./Module $(FLAGS) clean
|
53 |
$(MAKE) -C ./Module $(FLAGS) clean
|
54 |
$(MAKE) -C ./Common $(FLAGS) clean
|
54 |
$(MAKE) -C ./Common $(FLAGS) clean
|