mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
Use new directory structure.
This commit is contained in:
parent
93fb47050c
commit
90026180d1
17 changed files with 78 additions and 76 deletions
|
@ -1,10 +1,10 @@
|
|||
.c.$O:
|
||||
@echo cc $*.c
|
||||
@$(CC) $(CFLAGS) -I$(9SRC)/include $*.c
|
||||
@$(CC) $(CFLAGS) -I$(PLAN9)/include $*.c
|
||||
|
||||
%.$O: %.c
|
||||
@echo cc $*.c
|
||||
@$(CC) $(CFLAGS) -I$(9SRC)/include $*.c
|
||||
@$(CC) $(CFLAGS) -I$(PLAN9)/include $*.c
|
||||
|
||||
$(OFILES): $(HFILES)
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ LIBS=\
|
|||
libutf\
|
||||
|
||||
CMDS=\
|
||||
mk\
|
||||
sam\
|
||||
samterm\
|
||||
cmd/mk\
|
||||
cmd/sam\
|
||||
cmd/samterm\
|
||||
|
||||
all clean install nuke:
|
||||
for i in $(LIBS) $(CMDS); \
|
||||
|
|
|
@ -13,8 +13,8 @@ X11=/usr/X11R6
|
|||
LDFLAGS=
|
||||
CFLAGS=
|
||||
|
||||
include $(9SRC)/Make.$(SYSNAME)-$(OBJTYPE)
|
||||
LDFLAGS+=-L$(9SRC)/lib
|
||||
include $(PLAN9)/src/Make.$(SYSNAME)-$(OBJTYPE)
|
||||
LDFLAGS+=-L$(PLAN9)/lib
|
||||
|
||||
CLEANFILES=*.$O
|
||||
NUKEFILES=
|
||||
|
|
|
@ -4,10 +4,10 @@ $(TARG): $(OFILES)
|
|||
$(CC) -o $(TARG) $(OFILES) $(LDFLAGS)
|
||||
|
||||
CLEANFILES+=$(TARG)
|
||||
NUKEFILES+=$(9SRC)/bin/$(TARG)
|
||||
NUKEFILES+=$(PLAN9)/bin/$(TARG)
|
||||
|
||||
include $(9SRC)/Makecommon
|
||||
include $(PLAN9)/src/Makecommon
|
||||
|
||||
install: $(TARG)
|
||||
cp $(TARG) $(9SRC)/bin
|
||||
cp $(TARG) $(PLAN9)/bin
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
all install: $(9SRC)/lib/$(LIB)
|
||||
all install: $(PLAN9)/lib/$(LIB)
|
||||
|
||||
$(9SRC)/lib/$(LIB): $(OFILES)
|
||||
$(AR) $(ARFLAGS) $(9SRC)/lib/$(LIB) $(OFILES)
|
||||
$(RANLIB) $(9SRC)/lib/$(LIB)
|
||||
$(PLAN9)/lib/$(LIB): $(OFILES)
|
||||
$(AR) $(ARFLAGS) $(PLAN9)/lib/$(LIB) $(OFILES)
|
||||
$(RANLIB) $(PLAN9)/lib/$(LIB)
|
||||
|
||||
include $(9SRC)/Makecommon
|
||||
include $(PLAN9)/src/Makecommon
|
||||
|
||||
NUKEFILES+=$(9SRC)/lib/$(LIB)
|
||||
NUKEFILES+=$(PLAN9)/lib/$(LIB)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
TARG=mk
|
||||
|
||||
|
@ -31,7 +31,7 @@ HFILES=\
|
|||
mk.h\
|
||||
fns.h\
|
||||
|
||||
LDFLAGS+=-lregexp9 -lbio -lfmt -lutf
|
||||
LDFLAGS+=-lregexp9 -lbio -l9 -lfmt -lutf
|
||||
|
||||
include $(9SRC)/Makeone
|
||||
include $(PLAN9)/src/Makeone
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
TARG=sam
|
||||
OFILES=sam.$O\
|
||||
|
@ -30,5 +30,5 @@ HFILES=sam.h\
|
|||
|
||||
LDFLAGS+=-l9 -lfmt -lutf
|
||||
|
||||
include $(9SRC)/Makeone
|
||||
include $(PLAN9)/src/Makeone
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ static Rune r3[] = {'\'', '"', '`', 0};
|
|||
Rune *right[]= { r1, r2, r3, 0};
|
||||
|
||||
#ifndef SAMTERMNAME
|
||||
#define SAMTERMNAME "/usr/local/bin/samterm"
|
||||
#define SAMTERMNAME "/usr/local/plan9/bin/samterm"
|
||||
#endif
|
||||
#ifndef TMPDIRNAME
|
||||
#define TMPDIRNAME "/tmp"
|
||||
|
@ -39,7 +39,7 @@ Rune *right[]= { r1, r2, r3, 0};
|
|||
#define RXPATHNAME "/usr/local/bin/ssh"
|
||||
#endif
|
||||
#ifndef SAMSAVECMDNAME
|
||||
#define SAMSAVECMDNAME "/bin/rc\n/usr/local/bin/samsave"
|
||||
#define SAMSAVECMDNAME "/bin/sh\n/usr/local/plan9/bin/samsave"
|
||||
#endif
|
||||
|
||||
char RSAM[] = "sam";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
TARG=samterm
|
||||
OFILES=\
|
||||
|
@ -18,12 +18,12 @@ HFILES=\
|
|||
flayer.h\
|
||||
../sam/sam.h\
|
||||
../sam/mesg.h\
|
||||
$(9SRC)/include/frame.h\
|
||||
$(9SRC)/include/draw.h\
|
||||
$(PLAN9)/include/frame.h\
|
||||
$(PLAN9)/include/draw.h\
|
||||
|
||||
CFLAGS+=-I../sam
|
||||
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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
LIB=lib9.a
|
||||
|
||||
|
@ -31,7 +31,7 @@ OFILES=\
|
|||
werrstr.$O\
|
||||
|
||||
HFILES=\
|
||||
$(9SRC)/include/lib9.h\
|
||||
$(PLAN9)/include/lib9.h\
|
||||
|
||||
include $(9SRC)/Makesyslib
|
||||
include $(PLAN9)/src/Makesyslib
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
LIB=libbio.a
|
||||
|
||||
|
@ -22,10 +22,10 @@ OFILES=\
|
|||
bputrune.$O\
|
||||
|
||||
HFILES=\
|
||||
$(9SRC)/include/bio.h\
|
||||
$(PLAN9)/include/bio.h\
|
||||
|
||||
include $(9SRC)/Makesyslib
|
||||
include $(PLAN9)/src/Makesyslib
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
LIB=libdraw.a
|
||||
|
||||
|
@ -104,20 +104,20 @@ OFILES=\
|
|||
unix.$O\
|
||||
|
||||
HFILES=\
|
||||
$(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\
|
||||
$(PLAN9)/include/draw.h\
|
||||
$(PLAN9)/include/memdraw.h\
|
||||
$(PLAN9)/include/memlayer.h\
|
||||
$(PLAN9)/include/event.h\
|
||||
$(PLAN9)/include/cursor.h\
|
||||
$(PLAN9)/include/mouse.h\
|
||||
$(PLAN9)/include/keyboard.h\
|
||||
x11-inc.h\
|
||||
x11-memdraw.h\
|
||||
|
||||
CFLAGS+=-I$(X11)/include
|
||||
|
||||
include $(9SRC)/Makesyslib
|
||||
include $(PLAN9)/src/Makesyslib
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
LIB=libfmt.a
|
||||
|
||||
|
@ -7,8 +7,10 @@ NUM=\
|
|||
charstod.$O\
|
||||
pow10.$O\
|
||||
|
||||
# Could add errfmt, but we want to pick it up from lib9 instead.
|
||||
OFILES=\
|
||||
dofmt.$O\
|
||||
errfmt.$O\
|
||||
fltfmt.$O\
|
||||
fmt.$O\
|
||||
fmtfd.$O\
|
||||
|
@ -43,13 +45,13 @@ OFILES=\
|
|||
|
||||
HFILES=\
|
||||
fmtdef.h\
|
||||
$(9SRC)/include/fmt.h\
|
||||
$(PLAN9)/include/fmt.h\
|
||||
|
||||
include $(9SRC)/Makesyslib
|
||||
include $(PLAN9)/src/Makesyslib
|
||||
|
||||
$(NAN).$O: nan.h
|
||||
strtod.$O: nan.h
|
||||
|
||||
test: $(LIB) test.$O
|
||||
$(CC) -o test test.$O $(LIB) -L$(9SRC)/lib -lutf
|
||||
$(CC) -o test test.$O $(LIB) -L$(PLAN9)/lib -lutf
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
LIB=libframe.a
|
||||
|
||||
|
@ -15,8 +15,8 @@ OFILES=\
|
|||
frutil.$O\
|
||||
|
||||
HFILES=\
|
||||
$(9SRC)/include/frame.h\
|
||||
$(9SRC)/include/draw.h\
|
||||
$(PLAN9)/include/frame.h\
|
||||
$(PLAN9)/include/draw.h\
|
||||
|
||||
include $(9SRC)/Makesyslib
|
||||
include $(PLAN9)/src/Makesyslib
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
LIB=libregexp9.a
|
||||
|
||||
|
@ -14,10 +14,10 @@ OFILES=\
|
|||
rregsub.$O\
|
||||
|
||||
HFILES=\
|
||||
$(9SRC)/include/regexp9.h\
|
||||
$(PLAN9)/include/regexp9.h\
|
||||
regcomp.h\
|
||||
|
||||
include $(9SRC)/Makesyslib
|
||||
include $(PLAN9)/src/Makesyslib
|
||||
|
||||
test: test.$O $(LIB)
|
||||
$(CC) -o test test.$O $(LIB) -L/usr/local/lib -lfmt -lutf
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
LIB=libthread.a
|
||||
|
||||
|
@ -33,19 +33,19 @@ OFILES=\
|
|||
sched.$O\
|
||||
|
||||
HFILES=\
|
||||
$(9SRC)/include/thread.h\
|
||||
$(PLAN9)/include/thread.h\
|
||||
label.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
|
||||
|
||||
texec: texec.$O $(9SRC)/lib/$(LIB)
|
||||
texec: texec.$O $(PLAN9)/lib/$(LIB)
|
||||
$(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
|
||||
|
||||
CLEANFILES+=tprimes texec
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
9SRC=..
|
||||
include $(9SRC)/Makehdr
|
||||
PLAN9=../..
|
||||
include $(PLAN9)/src/Makehdr
|
||||
|
||||
LIB=libutf.a
|
||||
|
||||
|
@ -26,6 +26,6 @@ OFILES=\
|
|||
utfutf.$O\
|
||||
|
||||
HFILES=\
|
||||
$(9SRC)/include/utf.h\
|
||||
$(PLAN9)/include/utf.h\
|
||||
|
||||
include $(9SRC)/Makesyslib
|
||||
include $(PLAN9)/src/Makesyslib
|
||||
|
|
Loading…
Reference in a new issue