Subversion Repositories Tewi

Rev

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

Rev 244 Rev 251
Line 1... Line 1...
1
# $Id: Makefile 244 2024-10-03 20:04:15Z nishi $
1
# $Id: Makefile 251 2024-10-03 21:15:19Z nishi $
2
 
2
 
3
PWD = `pwd`
3
PWD = `pwd`
4
PLATFORM = generic
4
PLATFORM = generic
5
PLATFORM_IDENT = NOT_WINDOWS
5
PLATFORM_IDENT = NOT_WINDOWS
6
PREFIX = /usr/local
6
PREFIX = /usr/local
Line 32... Line 32...
32
 
32
 
33
./Common::
33
./Common::
34
	$(MAKE) -C $@ $(FLAGS)
34
	$(MAKE) -C $@ $(FLAGS)
35
 
35
 
36
./README: ./README.tmpl ./Server/tw_version.h
36
./README: ./README.tmpl ./Server/tw_version.h
37
	sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@
37
	sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@
38
 
38
 
39
install: all ./Tool/genconf ./Tool/itworks
39
install: all ./Tool/genconf ./Tool/itworks
40
	mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www
40
	mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www
41
	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
41
	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
42
	if [ ! -e $(DESTDIR)$(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(DESTDIR)$(PREFIX)/www/index.html || ( rm $(DESTDIR)$(PREFIX)/www/index.html ; exit 1 ) ) ; fi
42
	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 46... Line 46...
46
 
46
 
47
format:
47
format:
48
	clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
48
	clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
49
 
49
 
50
get-version:
50
get-version:
51
	@grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed 's/^"//g'
51
	@grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'
52
 
52
 
53
clean:
53
clean:
54
	$(MAKE) -C ./Server $(FLAGS) clean
54
	$(MAKE) -C ./Server $(FLAGS) clean
55
	$(MAKE) -C ./Module $(FLAGS) clean
55
	$(MAKE) -C ./Module $(FLAGS) clean
56
	$(MAKE) -C ./Common $(FLAGS) clean
56
	$(MAKE) -C ./Common $(FLAGS) clean