make -> mk

This commit is contained in:
rsc 2003-11-23 18:22:36 +00:00
parent db6608bd81
commit 99947423b1
20 changed files with 54 additions and 191 deletions

View file

@ -1,8 +0,0 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O
RANLIB=ranlib
LD=gcc

View file

@ -1,8 +0,0 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
NAN=nan64.$O
RANLIB=true

View file

@ -1,7 +0,0 @@
CC=cc
CFLAGS=-O -c -Ae -I.
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O
RANLIB=true

View file

@ -1,8 +0,0 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I.
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
NAN=nan64.$O
RANLIB=true

View file

@ -1,8 +0,0 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME)
NAN=nan64.$O
RANLIB=true

View file

@ -1,7 +0,0 @@
CC=cc
CFLAGS+=-g -c -I.
O=o
AR=ar
ARFLAGS=rvc
NAN=nan64.$O
RANLIB=true

View file

@ -1,3 +0,0 @@
include Make.SunOS-sun4u-$(CC)
NAN=nan64.$O
RANLIB=true

View file

@ -1,5 +0,0 @@
CC=cc
CFLAGS+=-g -c -I. -O
O=o
AR=ar
ARFLAGS=rvc

View file

@ -1,5 +0,0 @@
CC=gcc
CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c
O=o
AR=ar
ARFLAGS=rvc

View file

@ -1,17 +0,0 @@
.c.$O:
@echo cc $*.c
@$(CC) $(CFLAGS) -I$(PLAN9)/include $*.c
%.$O: %.c
@echo cc $*.c
@$(CC) $(CFLAGS) -I$(PLAN9)/include $*.c
$(OFILES): $(HFILES)
clean:
rm -f $(CLEANFILES)
nuke:
rm -f $(CLEANFILES) $(NUKEFILES)
.phony: all install clean nuke

View file

@ -1,21 +0,0 @@
LIBS=\
lib9\
libbio\
libdraw\
libfmt\
libframe\
libregexp\
libthread\
libutf\
CMDS=\
cmd/mk\
cmd/sam\
cmd/samterm\
all clean install nuke:
for i in $(LIBS) $(CMDS); \
do \
(echo $$i; cd $$i; $(MAKE) $@); \
done

View file

@ -1,23 +0,0 @@
# 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.
X11=/usr/X11R6
LDFLAGS=
CFLAGS=
BIN=$(PLAN9)/bin
include $(PLAN9)/src/Make.$(SYSNAME)-$(OBJTYPE)
LDFLAGS+=-L$(PLAN9)/lib
CLEANFILES=*.$O
NUKEFILES=

View file

@ -1,15 +0,0 @@
all: $(TARG)
a.%: %.o $(OFILES)
$(CC) -o $@ $^ $(LDFLAGS)
CLEANFILES+=$(TARG)
NUKEFILES+=$(BIN)/$(TARG)
include $(PLAN9)/src/Makecommon
install: $(TARG)
for i in $(TARG); do cp a.$$i $(BIN); done

View file

@ -1,13 +0,0 @@
all: $(TARG)
$(TARG): $(OFILES)
$(CC) -o $(TARG) $(OFILES) $(LDFLAGS)
CLEANFILES+=$(TARG)
NUKEFILES+=$(BIN)/$(TARG)
include $(PLAN9)/src/Makecommon
install: $(TARG)
cp $(TARG) $(BIN)

View file

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

View file

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

20
src/libip/mkfile Normal file
View file

@ -0,0 +1,20 @@
PLAN9=../..
<$PLAN9/src/mkhdr
LIB=libip.a
OFILES=\
eipfmt.$O\
parseip.$O\
parseether.$O\
myetheraddr.$O\
myipaddr.$O\
classmask.$O\
bo.$O\
readipifc.$O\
ipaux.$O\
ptclbsum.$O\
HFILES=\
ip.h
<$PLAN9/src/mksyslib

View file

@ -1,27 +0,0 @@
PLAN9=../..
include $(PLAN9)/src/Makehdr
LIB=libregexp9.a
OFILES=\
regcomp.$O\
regerror.$O\
regexec.$O\
regsub.$O\
regaux.$O\
rregaux.$O\
rregexec.$O\
rregsub.$O\
HFILES=\
$(PLAN9)/include/regexp9.h\
regcomp.h\
include $(PLAN9)/src/Makesyslib
test: test.$O $(LIB)
$(CC) -o test test.$O $(LIB) -L/usr/local/lib -lfmt -lutf
test2: test2.$O $(LIB)
$(CC) -o test2 test2.$O $(LIB) -L/usr/local/lib -lfmt -lutf

27
src/libregexp/mkfile Normal file
View file

@ -0,0 +1,27 @@
PLAN9=../..
<$PLAN9/src/mkhdr
LIB=libregexp9.a
OFILES=\
regcomp.$O\
regerror.$O\
regexec.$O\
regsub.$O\
regaux.$O\
rregaux.$O\
rregexec.$O\
rregsub.$O\
HFILES=\
$PLAN9/include/regexp9.h\
regcomp.h\
<$PLAN9/src/mksyslib
test: test.$O $LIB
$CC -o test test.$O $LIB -L/usr/local/lib -lfmt -lutf
test2: test2.$O $LIB
$CC -o test2 test2.$O $LIB -L/usr/local/lib -lfmt -lutf

View file

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