Reorg
This commit is contained in:
parent
2df2758496
commit
522b0689c3
180 changed files with 245 additions and 6144 deletions
|
|
@ -1,30 +1,8 @@
|
|||
|
||||
# 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=libdraw.a
|
||||
VERSION=2.0
|
||||
PORTPLACE=devel/libdraw
|
||||
NAME=libdraw
|
||||
|
||||
# keyboard.$O\
|
||||
# newwindow.$O\
|
||||
OFILES=\
|
||||
alloc.$O\
|
||||
allocimagemix.$O\
|
||||
|
|
@ -125,70 +103,20 @@ OFILES=\
|
|||
unix.$O\
|
||||
|
||||
HFILES=\
|
||||
draw.h\
|
||||
memdraw.h
|
||||
$(9SRC)/include/draw.h\
|
||||
$(9SRC)/include/memdraw.h\
|
||||
$(9SRC)/include/memlayer.h\
|
||||
$(9SRC)/include/event.h\
|
||||
$(9SRC)/include/cursor.h\
|
||||
$(9SRC)/include/mouse.h\
|
||||
$(9SRC)/include/keyboard.h\
|
||||
x11-inc.h\
|
||||
x11-memdraw.h\
|
||||
|
||||
all: $(LIB)
|
||||
CFLAGS+=-I$(X11)/include
|
||||
|
||||
install: $(LIB)
|
||||
install -c -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
|
||||
install -c -m 0644 draw.h $(PREFIX)/include/draw.h
|
||||
install -c -m 0644 event.h $(PREFIX)/include/event.h
|
||||
install -c -m 0644 cursor.h $(PREFIX)/include/cursor.h
|
||||
install -c -m 0644 mouse.h $(PREFIX)/include/mouse.h
|
||||
install -c -m 0644 keyboard.h $(PREFIX)/include/keyboard.h
|
||||
include $(9SRC)/Makesyslib
|
||||
|
||||
test: test.o $(LIB)
|
||||
gcc -o test test.o $(LIB) -L$(PREFIX)/lib -l9 -lfmt -lutf -L/usr/X11R6/lib -lX11 -lm
|
||||
gcc -o test test.o -L$(9SRC) -ldraw -l9 -lfmt -lutf -L$(X11)/lib -lX11 -lm
|
||||
|
||||
$(LIB): $(OFILES)
|
||||
$(AR) $(ARFLAGS) $(LIB) $(OFILES)
|
||||
|
||||
NUKEFILES+=$(LIB)
|
||||
.c.$O:
|
||||
$(CC) $(CFLAGS) -I/usr/X11R6/include -I../sam -I$(PREFIX)/include $*.c
|
||||
|
||||
%.$O: %.c
|
||||
$(CC) $(CFLAGS) -I/usr/X11R6/include -I../sam -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
|
||||
|
||||
.phony: all clean nuke install tgz rpm ports
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue