Use new directory structure.

This commit is contained in:
rsc 2003-10-11 03:58:46 +00:00
parent 93fb47050c
commit 90026180d1
17 changed files with 78 additions and 76 deletions

View file

@ -1,10 +1,10 @@
.c.$O: .c.$O:
@echo cc $*.c @echo cc $*.c
@$(CC) $(CFLAGS) -I$(9SRC)/include $*.c @$(CC) $(CFLAGS) -I$(PLAN9)/include $*.c
%.$O: %.c %.$O: %.c
@echo cc $*.c @echo cc $*.c
@$(CC) $(CFLAGS) -I$(9SRC)/include $*.c @$(CC) $(CFLAGS) -I$(PLAN9)/include $*.c
$(OFILES): $(HFILES) $(OFILES): $(HFILES)

View file

@ -9,9 +9,9 @@ LIBS=\
libutf\ libutf\
CMDS=\ CMDS=\
mk\ cmd/mk\
sam\ cmd/sam\
samterm\ cmd/samterm\
all clean install nuke: all clean install nuke:
for i in $(LIBS) $(CMDS); \ for i in $(LIBS) $(CMDS); \

View file

@ -13,8 +13,8 @@ X11=/usr/X11R6
LDFLAGS= LDFLAGS=
CFLAGS= CFLAGS=
include $(9SRC)/Make.$(SYSNAME)-$(OBJTYPE) include $(PLAN9)/src/Make.$(SYSNAME)-$(OBJTYPE)
LDFLAGS+=-L$(9SRC)/lib LDFLAGS+=-L$(PLAN9)/lib
CLEANFILES=*.$O CLEANFILES=*.$O
NUKEFILES= NUKEFILES=

View file

@ -4,10 +4,10 @@ $(TARG): $(OFILES)
$(CC) -o $(TARG) $(OFILES) $(LDFLAGS) $(CC) -o $(TARG) $(OFILES) $(LDFLAGS)
CLEANFILES+=$(TARG) CLEANFILES+=$(TARG)
NUKEFILES+=$(9SRC)/bin/$(TARG) NUKEFILES+=$(PLAN9)/bin/$(TARG)
include $(9SRC)/Makecommon include $(PLAN9)/src/Makecommon
install: $(TARG) install: $(TARG)
cp $(TARG) $(9SRC)/bin cp $(TARG) $(PLAN9)/bin

View file

@ -1,9 +1,9 @@
all install: $(9SRC)/lib/$(LIB) all install: $(PLAN9)/lib/$(LIB)
$(9SRC)/lib/$(LIB): $(OFILES) $(PLAN9)/lib/$(LIB): $(OFILES)
$(AR) $(ARFLAGS) $(9SRC)/lib/$(LIB) $(OFILES) $(AR) $(ARFLAGS) $(PLAN9)/lib/$(LIB) $(OFILES)
$(RANLIB) $(9SRC)/lib/$(LIB) $(RANLIB) $(PLAN9)/lib/$(LIB)
include $(9SRC)/Makecommon include $(PLAN9)/src/Makecommon
NUKEFILES+=$(9SRC)/lib/$(LIB) NUKEFILES+=$(PLAN9)/lib/$(LIB)

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
TARG=mk TARG=mk
@ -31,7 +31,7 @@ HFILES=\
mk.h\ mk.h\
fns.h\ fns.h\
LDFLAGS+=-lregexp9 -lbio -lfmt -lutf LDFLAGS+=-lregexp9 -lbio -l9 -lfmt -lutf
include $(9SRC)/Makeone include $(PLAN9)/src/Makeone

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
TARG=sam TARG=sam
OFILES=sam.$O\ OFILES=sam.$O\
@ -30,5 +30,5 @@ HFILES=sam.h\
LDFLAGS+=-l9 -lfmt -lutf LDFLAGS+=-l9 -lfmt -lutf
include $(9SRC)/Makeone include $(PLAN9)/src/Makeone

View file

@ -21,7 +21,7 @@ static Rune r3[] = {'\'', '"', '`', 0};
Rune *right[]= { r1, r2, r3, 0}; Rune *right[]= { r1, r2, r3, 0};
#ifndef SAMTERMNAME #ifndef SAMTERMNAME
#define SAMTERMNAME "/usr/local/bin/samterm" #define SAMTERMNAME "/usr/local/plan9/bin/samterm"
#endif #endif
#ifndef TMPDIRNAME #ifndef TMPDIRNAME
#define TMPDIRNAME "/tmp" #define TMPDIRNAME "/tmp"
@ -39,7 +39,7 @@ Rune *right[]= { r1, r2, r3, 0};
#define RXPATHNAME "/usr/local/bin/ssh" #define RXPATHNAME "/usr/local/bin/ssh"
#endif #endif
#ifndef SAMSAVECMDNAME #ifndef SAMSAVECMDNAME
#define SAMSAVECMDNAME "/bin/rc\n/usr/local/bin/samsave" #define SAMSAVECMDNAME "/bin/sh\n/usr/local/plan9/bin/samsave"
#endif #endif
char RSAM[] = "sam"; char RSAM[] = "sam";

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
TARG=samterm TARG=samterm
OFILES=\ OFILES=\
@ -18,12 +18,12 @@ HFILES=\
flayer.h\ flayer.h\
../sam/sam.h\ ../sam/sam.h\
../sam/mesg.h\ ../sam/mesg.h\
$(9SRC)/include/frame.h\ $(PLAN9)/include/frame.h\
$(9SRC)/include/draw.h\ $(PLAN9)/include/draw.h\
CFLAGS+=-I../sam CFLAGS+=-I../sam
LDFLAGS+=-lframe -ldraw -lthread -l9 -lregexp9 -lbio -lfmt -lutf -L$(X11)/lib -lX11 -lm LDFLAGS+=-lframe -ldraw -lthread -l9 -lregexp9 -lbio -lfmt -lutf -L$(X11)/lib -lX11 -lm
samterm: $(9SRC)/lib/libdraw.a samterm: $(PLAN9)/lib/libdraw.a
include ../Makeone include $(PLAN9)/src/Makeone

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
LIB=lib9.a LIB=lib9.a
@ -31,7 +31,7 @@ OFILES=\
werrstr.$O\ werrstr.$O\
HFILES=\ HFILES=\
$(9SRC)/include/lib9.h\ $(PLAN9)/include/lib9.h\
include $(9SRC)/Makesyslib include $(PLAN9)/src/Makesyslib

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
LIB=libbio.a LIB=libbio.a
@ -22,10 +22,10 @@ OFILES=\
bputrune.$O\ bputrune.$O\
HFILES=\ HFILES=\
$(9SRC)/include/bio.h\ $(PLAN9)/include/bio.h\
include $(9SRC)/Makesyslib include $(PLAN9)/src/Makesyslib
bcat: bcat.$O $(LIB) bcat: bcat.$O $(LIB)
$(CC) -o bcat bcat.$O -L$(9SRC)/lib -lbio -lfmt -lutf $(CC) -o bcat bcat.$O -L$(PLAN9)/lib -lbio -lfmt -lutf

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
LIB=libdraw.a LIB=libdraw.a
@ -104,20 +104,20 @@ OFILES=\
unix.$O\ unix.$O\
HFILES=\ HFILES=\
$(9SRC)/include/draw.h\ $(PLAN9)/include/draw.h\
$(9SRC)/include/memdraw.h\ $(PLAN9)/include/memdraw.h\
$(9SRC)/include/memlayer.h\ $(PLAN9)/include/memlayer.h\
$(9SRC)/include/event.h\ $(PLAN9)/include/event.h\
$(9SRC)/include/cursor.h\ $(PLAN9)/include/cursor.h\
$(9SRC)/include/mouse.h\ $(PLAN9)/include/mouse.h\
$(9SRC)/include/keyboard.h\ $(PLAN9)/include/keyboard.h\
x11-inc.h\ x11-inc.h\
x11-memdraw.h\ x11-memdraw.h\
CFLAGS+=-I$(X11)/include CFLAGS+=-I$(X11)/include
include $(9SRC)/Makesyslib include $(PLAN9)/src/Makesyslib
test: test.o $(LIB) test: test.o $(LIB)
gcc -o test test.o -L$(9SRC) -ldraw -l9 -lfmt -lutf -L$(X11)/lib -lX11 -lm gcc -o test test.o -L$(PLAN9) -ldraw -l9 -lfmt -lutf -L$(X11)/lib -lX11 -lm

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
LIB=libfmt.a LIB=libfmt.a
@ -7,8 +7,10 @@ NUM=\
charstod.$O\ charstod.$O\
pow10.$O\ pow10.$O\
# Could add errfmt, but we want to pick it up from lib9 instead.
OFILES=\ OFILES=\
dofmt.$O\ dofmt.$O\
errfmt.$O\
fltfmt.$O\ fltfmt.$O\
fmt.$O\ fmt.$O\
fmtfd.$O\ fmtfd.$O\
@ -43,13 +45,13 @@ OFILES=\
HFILES=\ HFILES=\
fmtdef.h\ fmtdef.h\
$(9SRC)/include/fmt.h\ $(PLAN9)/include/fmt.h\
include $(9SRC)/Makesyslib include $(PLAN9)/src/Makesyslib
$(NAN).$O: nan.h $(NAN).$O: nan.h
strtod.$O: nan.h strtod.$O: nan.h
test: $(LIB) test.$O test: $(LIB) test.$O
$(CC) -o test test.$O $(LIB) -L$(9SRC)/lib -lutf $(CC) -o test test.$O $(LIB) -L$(PLAN9)/lib -lutf

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
LIB=libframe.a LIB=libframe.a
@ -15,8 +15,8 @@ OFILES=\
frutil.$O\ frutil.$O\
HFILES=\ HFILES=\
$(9SRC)/include/frame.h\ $(PLAN9)/include/frame.h\
$(9SRC)/include/draw.h\ $(PLAN9)/include/draw.h\
include $(9SRC)/Makesyslib include $(PLAN9)/src/Makesyslib

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
LIB=libregexp9.a LIB=libregexp9.a
@ -14,10 +14,10 @@ OFILES=\
rregsub.$O\ rregsub.$O\
HFILES=\ HFILES=\
$(9SRC)/include/regexp9.h\ $(PLAN9)/include/regexp9.h\
regcomp.h\ regcomp.h\
include $(9SRC)/Makesyslib include $(PLAN9)/src/Makesyslib
test: test.$O $(LIB) test: test.$O $(LIB)
$(CC) -o test test.$O $(LIB) -L/usr/local/lib -lfmt -lutf $(CC) -o test test.$O $(LIB) -L/usr/local/lib -lfmt -lutf

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
LIB=libthread.a LIB=libthread.a
@ -33,19 +33,19 @@ OFILES=\
sched.$O\ sched.$O\
HFILES=\ HFILES=\
$(9SRC)/include/thread.h\ $(PLAN9)/include/thread.h\
label.h\ label.h\
threadimpl.h\ threadimpl.h\
include $(9SRC)/Makesyslib include $(PLAN9)/src/Makesyslib
tprimes: tprimes.$O $(9SRC)/lib/$(LIB) tprimes: tprimes.$O $(PLAN9)/lib/$(LIB)
$(LD) -o tprimes tprimes.$O $(LDFLAGS) -lthread -l9 -lfmt -lutf $(LD) -o tprimes tprimes.$O $(LDFLAGS) -lthread -l9 -lfmt -lutf
texec: texec.$O $(9SRC)/lib/$(LIB) texec: texec.$O $(PLAN9)/lib/$(LIB)
$(LD) -o texec texec.$O $(LDFLAGS) -lthread -l9 -lfmt -lutf $(LD) -o texec texec.$O $(LDFLAGS) -lthread -l9 -lfmt -lutf
trend: trend.$O $(9SRC)/lib/$(LIB) trend: trend.$O $(PLAN9)/lib/$(LIB)
$(LD) -o trend trend.$O $(LDFLAGS) -lthread -l9 -lfmt -lutf $(LD) -o trend trend.$O $(LDFLAGS) -lthread -l9 -lfmt -lutf
CLEANFILES+=tprimes texec CLEANFILES+=tprimes texec

View file

@ -1,5 +1,5 @@
9SRC=.. PLAN9=../..
include $(9SRC)/Makehdr include $(PLAN9)/src/Makehdr
LIB=libutf.a LIB=libutf.a
@ -26,6 +26,6 @@ OFILES=\
utfutf.$O\ utfutf.$O\
HFILES=\ HFILES=\
$(9SRC)/include/utf.h\ $(PLAN9)/include/utf.h\
include $(9SRC)/Makesyslib include $(PLAN9)/src/Makesyslib