Subversion Repositories Tewi

Rev

Rev 168 | Rev 171 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 168 Rev 170
Line 1... Line 1...
1
# $Id: Makefile 168 2024-09-26 20:24:04Z nishi $
1
# $Id: Makefile 170 2024-09-26 20:28:06Z nishi $
2
 
2
 
3
PWD = `pwd`
3
PWD = `pwd`
4
PLATFORM = generic
4
PLATFORM = generic
5
PREFIX = /usr/local
5
PREFIX = /usr/local
6
 
6
 
Line 32... Line 32...
32
 
32
 
33
./README: ./README.tmpl ./Server/tw_version.h
33
./README: ./README.tmpl ./Server/tw_version.h
34
	sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed -E 's/^"//g'`/g" ./README.tmpl > $@
34
	sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed -E 's/^"//g'`/g" ./README.tmpl > $@
35
 
35
 
36
install: all ./Tool/genconf ./Tool/itworks
36
install: all ./Tool/genconf ./Tool/itworks
37
	mkdir -p $(PREFIX)/bin $(PREFIX)/lib/tewi $(PREFIX)/etc $(PREFIX)/www
37
	mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(PREFIX)/www
38
	if [ ! -e $(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi so > $(PREFIX)/etc/tewi.conf || ( rm $(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi
38
	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 $(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(PREFIX)/www/index.html || ( rm $(PREFIX)/www/index.html ; exit 1 ) ) ; fi
39
	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 $(PREFIX)/www/pbtewi.gif ]; then ( cp Binary/pbtewi.gif $(PREFIX)/www/ || ( rm $(PREFIX)/www/pbtewi.gif ; exit 1 ) ) ; fi
40
	if [ ! -e $(DESTDIR)$(PREFIX)/www/pbtewi.gif ]; then ( cp Binary/pbtewi.gif $(DESTDIR)$(PREFIX)/www/ || ( rm $(DESTDIR)$(PREFIX)/www/pbtewi.gif ; exit 1 ) ) ; fi
41
	cp ./Server/tewi $(PREFIX)/bin/
41
	cp ./Server/tewi $(DESTDIR)$(PREFIX)/bin/
42
	cp ./Module/*.so $(PREFIX)/lib/tewi/
42
	cp ./Module/*.so $(DESTDIR)$(PREFIX)/lib/tewi/
43
 
43
 
44
format:
44
format:
45
	clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
45
	clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
46
 
46
 
47
get-version:
47
get-version: