# @(#) $Header: /usr/local/cvsroot/openacs-4/contrib/misc/smsc/smsq/Makefile,v 1.1 2003/12/02 06:17:38 rmello Exp $ # ifdef INST NSHOME ?= $(INST) else NSHOME ?= ../aolserver endif module = smsq cvspath = nsd-modules/$(module) version_ = $(subst .,_,$(version)) distdir = $(module)-$(version) distfile = $(distdir).tar.gz MOD = smsq.so # # Set the objects to build # OBJS = smsq.o gsm0338.o gsm0340.o include $(NSHOME)/include/Makefile.global all: $(MOD) %.o: %.c $(CC) -c $(CFLAGS) -D_TCL82 $< -o $@ $(MOD): $(OBJS) $(RM) $@ $(LDSO) $(LDSOFLAGS) -o $@ $^ $(MODLIBS) install: all $(RM) $(INSTBIN)/$(MOD) $(CP) $(MOD) $(INSTBIN) clean: $(RM) $(MOD) $(OBJS) clobber: clean $(RM) *.so *.o *.a *~ distclean: clobber $(RM) TAGS tags core *.gz release: check-version-var cvs rtag -r stable release-$(version_) $(cvspath) force-release: check-version-var cvs rtag -F -r stable release-$(version_) $(cvspath) dist: check-version-var $(distfile) publish: dist scp "$(distfile)" open-msg.com:www/aolserver ssh open-msg.com 'cd www/aolserver/src && rm -rf "./$(module)-"* && tar xvzf "../$(distfile)"' ssh -t open-msg.com vi www/aolserver/index.html $(distfile): rm -rf work mkdir work cd work && cvs -Q export -r "release-$(version_)" \ -d "$(distdir)" "$(cvspath)" find work -type f | xargs perl -pi -e 's/\@VER\@/$(version)/g' ( cd work && tar cvf - "$(distdir)" ) | gzip -9 > "$(distfile)" rm -rf work .PHONY: check-version-var check-version-var: @if [ "$(version)" = "" ]; then \ echo 1>&2 "\$$version must be set to version number."; \ exit 1; \ fi