- Timestamp:
- Oct 19, 2024, 8:27:01 AM (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r365 r386 12 12 FLAGS = PWD=$(PWD) PLATFORM=$(PLATFORM) PREFIX=$(PREFIX) 13 13 14 .PHONY: all format clean ./Server ./Common ./Module get-version src-archive14 .PHONY: all prepare-config format clean ./Server ./Common ./Module get-version src-archive 15 15 16 16 all: ./Server $(MODULE) 17 18 prepare-config: 19 if [ '!' -e config.h ]; then cp config.h.tmpl config.h ; fi 17 20 18 21 src-archive: clean … … 22 25 mv /tmp/tewi-`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`.tar.gz ./ 23 26 24 ./Tool/option: ./Tool/option.c config.h 27 ./Tool/option: ./Tool/option.c config.h prepare-config 25 28 cc -o $@ ./Tool/option.c 26 29 27 ./Tool/genconf: ./Tool/genconf.c config.h 30 ./Tool/genconf: ./Tool/genconf.c config.h prepare-config 28 31 cc -o $@ ./Tool/genconf.c 29 32 30 ./Tool/itworks: ./Tool/itworks.c config.h 33 ./Tool/itworks: ./Tool/itworks.c config.h prepare-config 31 34 cc -o $@ ./Tool/itworks.c 32 35 33 ./Server:: ./Common ./Tool/option ./Tool/genconf ./Tool/itworks 36 ./Server:: ./Common ./Tool/option ./Tool/genconf ./Tool/itworks prepare-config 34 37 $(MAKE) -C $@ $(FLAGS) EXTOBJS="`./Tool/option objs ../ $(PLATFORM_IDENT) $(OBJ)`" EXTLIBS="`./Tool/option libs ../ $(PLATFORM_IDENT) $(OBJ)`" EXTCFLAGS="`./Tool/option cflags ../ $(PLATFORM_IDENT) $(OBJ)`" EXTLDFLAGS="`./Tool/option ldflags ../ $(PLATFORM_IDENT) $(OBJ)`" 35 38 36 ./Module:: ./Common 39 ./Module:: ./Common prepare-config 37 40 $(MAKE) -C $@ $(FLAGS) 38 41 39 ./Common:: 42 ./Common:: prepare-config 40 43 $(MAKE) -C $@ $(FLAGS) 41 44 42 45 ./README: ./README.tmpl ./Server/tw_version.h 43 sed "s/@ VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@46 sed "s/@*VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@ 44 47 45 48 install: all ./Tool/genconf ./Tool/itworks 46 -mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www47 if [ !-e $(DESTDIR)$(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi `echo $(LIBSUF) | sed 's/\.//g'` > $(DESTDIR)$(PREFIX)/etc/tewi.conf || ( rm $(DESTDIR)$(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi49 -mkdir -p* $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www 50 if [ '!' -e $(DESTDIR)$(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi `echo $(LIBSUF) | sed 's/\.//g'` > $(DESTDIR)$(PREFIX)/etc/tewi.conf || ( rm $(DESTDIR)$(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi 48 51 cp mime.types $(DESTDIR)$(PREFIX)/ 49 if [ !-e $(DESTDIR)$(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(DESTDIR)$(PREFIX)/www/index.html || ( rm $(DESTDIR)$(PREFIX)/www/index.html ; exit 1 ) ) ; fi50 if [ !-e $(DESTDIR)$(PREFIX)/www/pbtewi.gif ]; then ( cp Binary/pbtewi.gif $(DESTDIR)$(PREFIX)/www/ || ( rm $(DESTDIR)$(PREFIX)/www/pbtewi.gif ; exit 1 ) ) ; fi52 if [ '!' -e $(DESTDIR)$(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(DESTDIR)$(PREFIX)/www/index.html || ( rm $(DESTDIR)$(PREFIX)/www/index.html ; exit 1 ) ) ; fi 53 if [ '!' -e $(DESTDIR)$(PREFIX)/www/pbtewi.gif ]; then ( cp Binary/pbtewi.gif $(DESTDIR)$(PREFIX)/www/ || ( rm $(DESTDIR)$(PREFIX)/www/pbtewi.gif ; exit 1 ) ) ; fi 51 54 -cp ./Server/tewi $(DESTDIR)$(PREFIX)/bin/ 52 55 -cp ./Server/tewi.exe $(DESTDIR)$(PREFIX)/bin/
Note:
See TracChangeset
for help on using the changeset viewer.