2 # this works in gnu make
3 SYSNAME:=${shell uname}
4 OBJTYPE:=${shell uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'}
6 # this works in bsd make
8 OBJTYPE!=uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'
10 # the gnu rules will mess up bsd but not vice versa,
11 # hence the gnu rules come first.
13 include Make.$(SYSNAME)-$(OBJTYPE)
34 getcallerpc-$(OBJTYPE).$O\
59 test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
60 # install -m 0644 lib9.3 $(PREFIX)/man/man3/lib9.3
61 install -m 0644 lib9.h $(PREFIX)/include/lib9.h
62 install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
65 $(CC) -o test test.$O $(LIB) -L$(PREFIX)/lib -lfmt -lutf
67 testfork: $(LIB) testfork.$O
68 $(CC) -o testfork testfork.$O $(LIB) -L$(PREFIX)/lib -lfmt -lutf
71 $(AR) $(ARFLAGS) $(LIB) $(OFILES)
75 $(CC) $(CFLAGS) -I$(PREFIX)/include $*.c
78 $(CC) $(CFLAGS) -I$(PREFIX)/include $*.c
84 rm -rf $(NAME)-$(VERSION)
85 mkdir $(NAME)-$(VERSION)
86 cp Makefile Make.* README LICENSE NOTICE *.[ch137] rpm.spec bundle.ports $(TGZFILES) $(NAME)-$(VERSION)
87 tar cf - $(NAME)-$(VERSION) | gzip >$(NAME)-$(VERSION).tgz
88 rm -rf $(NAME)-$(VERSION)
91 rm -f $(OFILES) $(LIB)
94 rm -f $(OFILES) *.tgz *.rpm $(NUKEFILES)
98 cp $(NAME)-$(VERSION).tgz /usr/src/RPM/SOURCES
100 cp /usr/src/RPM/SRPMS/$(NAME)-$(VERSION)-1.src.rpm .
101 cp /usr/src/RPM/RPMS/i586/$(NAME)-$(VERSION)-1.i586.rpm .
102 scp *.rpm rsc@amsterdam.lcs.mit.edu:public_html/software
104 PORTDIR=/usr/ports/$(PORTPLACE)
110 cp $(NAME)-$(VERSION).tgz /usr/ports/distfiles
111 cat bundle.ports | (cd $(PORTDIR) && awk '$$1=="---" && $$3=="---" { ofile=$$2; next} {if(ofile) print >ofile}')
112 (cd $(PORTDIR); make makesum)
113 (cd $(PORTDIR); make)
114 (cd $(PORTDIR); /usr/local/bin/portlint)
115 rm -rf $(PORTDIR)/work
116 shar `find $(PORTDIR)` > ports.shar
117 (cd $(PORTDIR); tar cf - *) | gzip >$(NAME)-$(VERSION)-ports.tgz
118 scp *.tgz rsc@amsterdam.lcs.mit.edu:public_html/software
120 .phony: all clean nuke install tgz rpm ports