aboutsummaryrefslogtreecommitdiff
path: root/src/libfmt/Makefile
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-09-30 19:05:50 +0000
committerrsc <devnull@localhost>2003-09-30 19:05:50 +0000
commit522b0689c340d26feeac360640bf7e2e0582353c (patch)
treeba3a550c28684be3b3997899528a110c4e9cd91a /src/libfmt/Makefile
parent2df2758496b2ab508d349208449f04d85ae2eb2c (diff)
downloadplan9port-522b0689c340d26feeac360640bf7e2e0582353c.tar.gz
plan9port-522b0689c340d26feeac360640bf7e2e0582353c.tar.bz2
plan9port-522b0689c340d26feeac360640bf7e2e0582353c.zip
Reorg
Diffstat (limited to 'src/libfmt/Makefile')
-rw-r--r--src/libfmt/Makefile88
1 files changed, 5 insertions, 83 deletions
diff --git a/src/libfmt/Makefile b/src/libfmt/Makefile
index 4b8ff604..0b072191 100644
--- a/src/libfmt/Makefile
+++ b/src/libfmt/Makefile
@@ -1,27 +1,7 @@
-
-# this works in gnu make
-SYSNAME:=${shell uname}
-OBJTYPE:=${shell uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'}
-
-# this works in bsd make
-SYSNAME!=uname
-OBJTYPE!=uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'
-
-# the gnu rules will mess up bsd but not vice versa,
-# hence the gnu rules come first.
-
-include Make.$(SYSNAME)-$(OBJTYPE)
-
-PREFIX=/usr/local
-
-NUKEFILES=
-
-TGZFILES=
+9SRC=..
+include $(9SRC)/Makehdr
LIB=libfmt.a
-VERSION=2.0
-PORTPLACE=devel/libfmt
-NAME=libfmt
NUM=\
charstod.$O\
@@ -64,71 +44,13 @@ OFILES=\
HFILES=\
fmtdef.h\
- fmt.h\
-
-all: $(LIB)
+ $(9SRC)/include/fmt.h\
-install: $(LIB)
- test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
- install -m 0644 print.3 $(PREFIX)/man/man3/print.3
- install -m 0644 fmtinstall.3 $(PREFIX)/man/man3/fmtinstall.3
- install -m 0644 fmt.h $(PREFIX)/include/fmt.h
- install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
+include $(9SRC)/Makesyslib
$(NAN).$O: nan.h
strtod.$O: nan.h
test: $(LIB) test.$O
- $(CC) -o test test.$O $(LIB) -L$(PREFIX)/lib -lutf
-
-$(LIB): $(OFILES)
- $(AR) $(ARFLAGS) $(LIB) $(OFILES)
-
-NUKEFILES+=$(LIB)
-.c.$O:
- $(CC) $(CFLAGS) -I$(PREFIX)/include $*.c
-
-%.$O: %.c
- $(CC) $(CFLAGS) -I$(PREFIX)/include $*.c
-
-
-$(OFILES): $(HFILES)
-
-tgz:
- rm -rf $(NAME)-$(VERSION)
- mkdir $(NAME)-$(VERSION)
- cp Makefile Make.* README LICENSE NOTICE *.[ch137] rpm.spec bundle.ports $(TGZFILES) $(NAME)-$(VERSION)
- tar cf - $(NAME)-$(VERSION) | gzip >$(NAME)-$(VERSION).tgz
- rm -rf $(NAME)-$(VERSION)
-
-clean:
- rm -f $(OFILES) $(LIB)
-
-nuke:
- rm -f $(OFILES) *.tgz *.rpm $(NUKEFILES)
-
-rpm:
- make tgz
- cp $(NAME)-$(VERSION).tgz /usr/src/RPM/SOURCES
- rpm -ba rpm.spec
- cp /usr/src/RPM/SRPMS/$(NAME)-$(VERSION)-1.src.rpm .
- cp /usr/src/RPM/RPMS/i586/$(NAME)-$(VERSION)-1.i586.rpm .
- scp *.rpm rsc@amsterdam.lcs.mit.edu:public_html/software
-
-PORTDIR=/usr/ports/$(PORTPLACE)
-
-ports:
- make tgz
- rm -rf $(PORTDIR)
- mkdir $(PORTDIR)
- cp $(NAME)-$(VERSION).tgz /usr/ports/distfiles
- cat bundle.ports | (cd $(PORTDIR) && awk '$$1=="---" && $$3=="---" { ofile=$$2; next} {if(ofile) print >ofile}')
- (cd $(PORTDIR); make makesum)
- (cd $(PORTDIR); make)
- (cd $(PORTDIR); /usr/local/bin/portlint)
- rm -rf $(PORTDIR)/work
- shar `find $(PORTDIR)` > ports.shar
- (cd $(PORTDIR); tar cf - *) | gzip >$(NAME)-$(VERSION)-ports.tgz
- scp *.tgz rsc@amsterdam.lcs.mit.edu:public_html/software
+ $(CC) -o test test.$O $(LIB) -L$(9SRC)/lib -lutf
-.phony: all clean nuke install tgz rpm ports