Added proto.make file

This commit is contained in:
ceriel 1991-08-23 14:06:51 +00:00
parent 5ca5519c75
commit 2b3ea5faab
8 changed files with 519 additions and 3 deletions

View file

@ -1,4 +1,4 @@
Makefile
proto.make
comm0.h
comm1.h
comm2.y

77
mach/proto/as/proto.make Normal file
View file

@ -0,0 +1,77 @@
# $Header$
#PARAMS do not remove this line!
#MACH_DEFINE do not remove this or the next line!
MACH =
h = $(TARGET_HOME)/h
LIBOBJ = $(TARGET_HOME)/modules/lib/libobject.$(LIBSUF)
CDIR = $(SRC_HOME)/mach/proto/as
CPP = $(UTIL_HOME)/lib.bin/cpp
DEF =
MDIR = $(SRC_HOME)/mach/$(MACH)/as
FFLAG =
INCL = -I$(CDIR) -I$(MDIR) -I$h $(DEF)
CFLAGS = $(FFLAG) $(INCL) $(COPTIONS)
YFLAGS = -d
LDFLAGS = $(FFLAG) $(LDOPTIONS)
CSRC = $(CDIR)/comm3.c $(CDIR)/comm4.c $(CDIR)/comm5.c \
$(CDIR)/comm6.c $(CDIR)/comm7.c $(CDIR)/comm8.c
COBJ = comm3.$(SUF) comm4.$(SUF) comm5.$(SUF) \
comm6.$(SUF) comm7.$(SUF) comm8.$(SUF)
MACHSRC = $(MDIR)/mach0.c $(MDIR)/mach1.c $(MDIR)/mach2.c \
$(MDIR)/mach3.c $(MDIR)/mach4.c $(MDIR)/mach5.c
COMM = $(CDIR)/comm0.h $(CDIR)/comm1.h $(CDIR)/comm2.y $(CSRC)
all: as
install:all
cp as $(TARGET_HOME)/lib.bin/$(MACH)/as
cmp:
-cmp as $(TARGET_HOME)/lib.bin/$(MACH)/as
clean:
rm -f *.$(SUF) as as.[cy] y.tab.h
pr: $(MACHSRC)
@pr -n $(MACHSRC)
opr:
make pr | opr
as: $(COBJ) as.$(SUF)
$(CC) $(LDFLAGS) $(COBJ) as.$(SUF) $(LIBOBJ) -o as
as.y: $(CDIR)/comm2.y
$(CPP) -P -I$(MDIR) -I$h $(DEF) $(CDIR)/comm2.y >as.y
-@if test -f $(MDIR)/Expect ; then cat $(MDIR)/Expect ; else echo "expect 1 shift/reduce conflict"; fi
lint: $(CSRC) as.c
$(LINT) $(LINTFLAGS) $(CSRC) as.c
as.c: as.y
yacc $(YFLAGS) as.y && mv y.tab.c as.c
y.tab.h: as.c
$(COBJ): y.tab.h
$(COBJ) as.y: $(CDIR)/comm0.h mach0.c
$(COBJ) as.y: $(CDIR)/comm1.h mach1.c
as.y: mach2.c
comm3.$(SUF): mach3.c
as.y: mach4.c
comm8.$(SUF): mach5.c
comm3.$(SUF): $(CDIR)/comm3.c
$(CC) -c $(CFLAGS) $(CDIR)/comm3.c
comm4.$(SUF): $(CDIR)/comm4.c
$(CC) -c $(CFLAGS) $(CDIR)/comm4.c
comm5.$(SUF): $(CDIR)/comm5.c
$(CC) -c $(CFLAGS) $(CDIR)/comm5.c
comm6.$(SUF): $(CDIR)/comm6.c
$(CC) -c $(CFLAGS) $(CDIR)/comm6.c
comm7.$(SUF): $(CDIR)/comm7.c
$(CC) -c $(CFLAGS) $(CDIR)/comm7.c
comm8.$(SUF): $(CDIR)/comm8.c
$(CC) -c $(CFLAGS) $(CDIR)/comm8.c

View file

@ -1,4 +1,4 @@
Makefile
proto.make
assert.h
codegen.c
compute.c

189
mach/proto/cg/proto.make Normal file
View file

@ -0,0 +1,189 @@
# $Header$
#PARAMS do not remove this line!
#MACH_DEFINE do not remove this or the next line!
MACH =
SRC_DIR = $(SRC_HOME)/mach/$(MACH)/cg
CDIR=$(SRC_HOME)/mach/proto/cg
LIBEM = $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
LIBFLT = $(TARGET_HOME)/modules/lib/libflt.$(LIBSUF)
CPP = $(UTIL_HOME)/lib.bin/cpp
CGG = $(UTIL_HOME)/lib.bin/cgg
PREFLAGS=-I$(TARGET_HOME)/h -I$(SRC_HOME)/mach -I$(TARGET_HOME)/modules/h -I$(SRC_DIR) -I. -I$(CDIR) -DNDEBUG
PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) $(COPTIONS)
LDFLAGS=$(PFLAGS) $(LDOPTIONS)
LINTFLAGS=$(PREFLAGS) $(LINTOPTIONS)
LIBS=$(LIBEM) $(LIBFLT)
CFILES=$(CDIR)/codegen.c $(CDIR)/compute.c $(CDIR)/equiv.c $(CDIR)/fillem.c \
$(CDIR)/gencode.c $(CDIR)/glosym.c $(CDIR)/main.c $(CDIR)/move.c \
$(CDIR)/nextem.c $(CDIR)/reg.c $(CDIR)/regvar.c $(CDIR)/salloc.c \
$(CDIR)/state.c $(CDIR)/subr.c $(CDIR)/var.c
OFILES= codegen.$(SUF) compute.$(SUF) equiv.$(SUF) fillem.$(SUF) \
gencode.$(SUF) glosym.$(SUF) main.$(SUF) move.$(SUF) nextem.$(SUF) \
reg.$(SUF) regvar.$(SUF) salloc.$(SUF) state.$(SUF) subr.$(SUF) \
var.$(SUF)
all: tables.c
make cg
cg: tables.o $(OFILES)
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
tables.$(SUF): tables.c
$(CC) -c $(PREFLAGS) tables.c
codegen.$(SUF): $(CDIR)/codegen.c
$(CC) -c $(CFLAGS) $(CDIR)/codegen.c
compute.$(SUF): $(CDIR)/compute.c
$(CC) -c $(CFLAGS) $(CDIR)/compute.c
equiv.$(SUF): $(CDIR)/equiv.c
$(CC) -c $(CFLAGS) $(CDIR)/equiv.c
fillem.$(SUF): $(CDIR)/fillem.c
$(CC) -c $(CFLAGS) $(CDIR)/fillem.c
gencode.$(SUF): $(CDIR)/gencode.c
$(CC) -c $(CFLAGS) $(CDIR)/gencode.c
glosym.$(SUF): $(CDIR)/glosym.c
$(CC) -c $(CFLAGS) $(CDIR)/glosym.c
main.$(SUF): $(CDIR)/main.c
$(CC) -c $(CFLAGS) $(CDIR)/main.c
move.$(SUF): $(CDIR)/move.c
$(CC) -c $(CFLAGS) $(CDIR)/move.c
nextem.$(SUF): $(CDIR)/nextem.c
$(CC) -c $(CFLAGS) $(CDIR)/nextem.c
reg.$(SUF): $(CDIR)/reg.c
$(CC) -c $(CFLAGS) $(CDIR)/reg.c
regvar.$(SUF): $(CDIR)/regvar.c
$(CC) -c $(CFLAGS) $(CDIR)/regvar.c
salloc.$(SUF): $(CDIR)/salloc.c
$(CC) -c $(CFLAGS) $(CDIR)/salloc.c
state.$(SUF): $(CDIR)/state.c
$(CC) -c $(CFLAGS) $(CDIR)/state.c
subr.$(SUF): $(CDIR)/subr.c
$(CC) -c $(CFLAGS) $(CDIR)/subr.c
var.$(SUF): $(CDIR)/var.c
$(CC) -c $(CFLAGS) $(CDIR)/var.c
install: all
cp cg $(TARGET_HOME)/lib.bin/$(MACH)/cg
cmp: all
-cmp cg $(TARGET_HOME)/lib.bin/$(MACH)/cg
tables.c: $(SRC_DIR)/table $(CGG)
-mv tables.h tables.h.save
$(CPP) -P -I$(SRC_DIR) $(SRC_DIR)/table | $(CGG) > debug.out
-if cmp -s tables.h.save tables.h; then mv tables.h.save tables.h; else exit 0; fi
-if cmp -s /dev/null tables.h; then mv tables.h.save tables.h; else exit 0; fi
lint: tables.c
$(LINT) $(LINTFLAGS) $(CFILES) tables.c
clean:
rm -f *.$(SUF) tables.c tables.h debug.out cg tables.h.save
codegen.$(SUF): $(CDIR)/assert.h
codegen.$(SUF): $(CDIR)/data.h
codegen.$(SUF): $(CDIR)/equiv.h
codegen.$(SUF): $(CDIR)/extern.h
codegen.$(SUF): $(CDIR)/param.h
codegen.$(SUF): $(CDIR)/result.h
codegen.$(SUF): $(CDIR)/state.h
codegen.$(SUF): tables.h
codegen.$(SUF): $(CDIR)/types.h
compute.$(SUF): $(CDIR)/assert.h
compute.$(SUF): $(CDIR)/data.h
compute.$(SUF): $(CDIR)/extern.h
compute.$(SUF): $(CDIR)/glosym.h
compute.$(SUF): $(CDIR)/param.h
compute.$(SUF): $(CDIR)/result.h
compute.$(SUF): tables.h
compute.$(SUF): $(CDIR)/types.h
equiv.$(SUF): $(CDIR)/assert.h
equiv.$(SUF): $(CDIR)/data.h
equiv.$(SUF): $(CDIR)/equiv.h
equiv.$(SUF): $(CDIR)/extern.h
equiv.$(SUF): $(CDIR)/param.h
equiv.$(SUF): $(CDIR)/result.h
equiv.$(SUF): tables.h
equiv.$(SUF): $(CDIR)/types.h
fillem.$(SUF): $(CDIR)/assert.h
fillem.$(SUF): $(CDIR)/data.h
fillem.$(SUF): $(CDIR)/extern.h
fillem.$(SUF): $(SRC_DIR)/mach.c
fillem.$(SUF): $(SRC_DIR)/mach.h
fillem.$(SUF): $(CDIR)/param.h
fillem.$(SUF): $(CDIR)/regvar.h
fillem.$(SUF): $(CDIR)/result.h
fillem.$(SUF): tables.h
fillem.$(SUF): $(CDIR)/types.h
gencode.$(SUF): $(CDIR)/assert.h
gencode.$(SUF): $(CDIR)/data.h
gencode.$(SUF): $(CDIR)/extern.h
gencode.$(SUF): $(CDIR)/param.h
gencode.$(SUF): $(CDIR)/result.h
gencode.$(SUF): tables.h
gencode.$(SUF): $(CDIR)/types.h
glosym.$(SUF): $(CDIR)/glosym.h
glosym.$(SUF): $(CDIR)/param.h
glosym.$(SUF): tables.h
glosym.$(SUF): $(CDIR)/types.h
main.$(SUF): $(CDIR)/param.h
move.$(SUF): $(CDIR)/assert.h
move.$(SUF): $(CDIR)/data.h
move.$(SUF): $(CDIR)/extern.h
move.$(SUF): $(CDIR)/param.h
move.$(SUF): $(CDIR)/result.h
move.$(SUF): tables.h
move.$(SUF): $(CDIR)/types.h
nextem.$(SUF): $(CDIR)/assert.h
nextem.$(SUF): $(CDIR)/data.h
nextem.$(SUF): $(CDIR)/extern.h
nextem.$(SUF): $(CDIR)/param.h
nextem.$(SUF): $(CDIR)/result.h
nextem.$(SUF): tables.h
nextem.$(SUF): $(CDIR)/types.h
reg.$(SUF): $(CDIR)/assert.h
reg.$(SUF): $(CDIR)/data.h
reg.$(SUF): $(CDIR)/extern.h
reg.$(SUF): $(CDIR)/param.h
reg.$(SUF): $(CDIR)/result.h
reg.$(SUF): tables.h
reg.$(SUF): $(CDIR)/types.h
regvar.$(SUF): $(CDIR)/assert.h
regvar.$(SUF): $(CDIR)/data.h
regvar.$(SUF): $(CDIR)/extern.h
regvar.$(SUF): $(CDIR)/param.h
regvar.$(SUF): $(CDIR)/regvar.h
regvar.$(SUF): $(CDIR)/result.h
regvar.$(SUF): tables.h
regvar.$(SUF): $(CDIR)/types.h
salloc.$(SUF): $(CDIR)/assert.h
salloc.$(SUF): $(CDIR)/data.h
salloc.$(SUF): $(CDIR)/extern.h
salloc.$(SUF): $(CDIR)/param.h
salloc.$(SUF): $(CDIR)/result.h
salloc.$(SUF): tables.h
salloc.$(SUF): $(CDIR)/types.h
state.$(SUF): $(CDIR)/assert.h
state.$(SUF): $(CDIR)/data.h
state.$(SUF): $(CDIR)/extern.h
state.$(SUF): $(CDIR)/param.h
state.$(SUF): $(CDIR)/result.h
state.$(SUF): $(CDIR)/state.h
state.$(SUF): tables.h
state.$(SUF): $(CDIR)/types.h
subr.$(SUF): $(CDIR)/assert.h
subr.$(SUF): $(CDIR)/data.h
subr.$(SUF): $(CDIR)/extern.h
subr.$(SUF): $(CDIR)/param.h
subr.$(SUF): $(CDIR)/result.h
subr.$(SUF): tables.h
subr.$(SUF): $(CDIR)/types.h
var.$(SUF): $(CDIR)/data.h
var.$(SUF): $(CDIR)/param.h
var.$(SUF): $(CDIR)/result.h
var.$(SUF): tables.h
var.$(SUF): $(CDIR)/types.h

View file

@ -1,3 +1,4 @@
proto.make
assert.h
codegen.c
compute.c

200
mach/proto/ncg/proto.make Normal file
View file

@ -0,0 +1,200 @@
# $Header$
#PARAMS do not remove this line!
#MACH_DEFINE do not remove this or the next line!
MACH =
SRC_DIR = $(SRC_HOME)/mach/$(MACH)/ncg
CDIR = $(SRC_HOME)/mach/proto/ncg
LIBEM = $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
LIBFLT = $(TARGET_HOME)/modules/lib/libflt.$(LIBSUF)
CPP = $(UTIL_HOME)/lib.bin/cpp
CGG = $(UTIL_HOME)/lib.bin/ncgg
#preprocessor flags for table
TABLEFLAGS=
#cgg options
CGGFLAGS=
PREFLAGS=-I$(TARGET_HOME)/h -I$(SRC_HOME)/mach -I$(TARGET_HOME)/modules/h -I$(SRC_DIR) -I. -I$(CDIR) -DNDEBUG
PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) $(COPTIONS)
LDFLAGS=$(PFLAGS) $(LDOPTIONS)
LINTFLAGS=$(PREFLAGS) $(LINTOPTIONS)
LIBS=$(LIBEM) $(LIBFLT)
CFILES=$(CDIR)/codegen.c $(CDIR)/compute.c $(CDIR)/equiv.c $(CDIR)/fillem.c \
$(CDIR)/gencode.c $(CDIR)/glosym.c $(CDIR)/label.c $(CDIR)/main.c \
$(CDIR)/move.c $(CDIR)/nextem.c $(CDIR)/reg.c $(CDIR)/regvar.c \
$(CDIR)/salloc.c $(CDIR)/state.c $(CDIR)/subr.c $(CDIR)/var.c
OFILES= codegen.$(SUF) compute.$(SUF) equiv.$(SUF) fillem.$(SUF) \
gencode.$(SUF) glosym.$(SUF) label.$(SUF) \
main.$(SUF) move.$(SUF) nextem.$(SUF) reg.$(SUF) regvar.$(SUF) \
salloc.$(SUF) state.$(SUF) subr.$(SUF) var.$(SUF)
all: tables.c
make cg
cg: tables.$(SUF) $(OFILES)
$(CC) $(LDFLAGS) $(OFILES) tables.$(SUF) $(LIBS) -o cg
tables.$(SUF): tables.c
$(CC) -c $(PREFLAGS) tables.c
codegen.$(SUF): $(CDIR)/codegen.c
$(CC) -c $(CFLAGS) $(CDIR)/codegen.c
compute.$(SUF): $(CDIR)/compute.c
$(CC) -c $(CFLAGS) $(CDIR)/compute.c
equiv.$(SUF): $(CDIR)/equiv.c
$(CC) -c $(CFLAGS) $(CDIR)/equiv.c
fillem.$(SUF): $(CDIR)/fillem.c
$(CC) -c $(CFLAGS) $(CDIR)/fillem.c
gencode.$(SUF): $(CDIR)/gencode.c
$(CC) -c $(CFLAGS) $(CDIR)/gencode.c
glosym.$(SUF): $(CDIR)/glosym.c
$(CC) -c $(CFLAGS) $(CDIR)/glosym.c
label.$(SUF): $(CDIR)/label.c
$(CC) -c $(CFLAGS) $(CDIR)/label.c
main.$(SUF): $(CDIR)/main.c
$(CC) -c $(CFLAGS) $(CDIR)/main.c
move.$(SUF): $(CDIR)/move.c
$(CC) -c $(CFLAGS) $(CDIR)/move.c
nextem.$(SUF): $(CDIR)/nextem.c
$(CC) -c $(CFLAGS) $(CDIR)/nextem.c
reg.$(SUF): $(CDIR)/reg.c
$(CC) -c $(CFLAGS) $(CDIR)/reg.c
regvar.$(SUF): $(CDIR)/regvar.c
$(CC) -c $(CFLAGS) $(CDIR)/regvar.c
salloc.$(SUF): $(CDIR)/salloc.c
$(CC) -c $(CFLAGS) $(CDIR)/salloc.c
state.$(SUF): $(CDIR)/state.c
$(CC) -c $(CFLAGS) $(CDIR)/state.c
subr.$(SUF): $(CDIR)/subr.c
$(CC) -c $(CFLAGS) $(CDIR)/subr.c
var.$(SUF): $(CDIR)/var.c
$(CC) -c $(CFLAGS) $(CDIR)/var.c
install: all
cp cg $(TARGET_MOME)/lib.bin/$(MACH)/cg
cmp: all
-cmp cg $(TARGET_MOME)/lib.bin/$(MACH)/cg
tables.c: $(SRC_HOME)/$(TABLE) $(CGG)
$(CPP) -I$(SRC_DIR) $(TABLEFLAGS) $(SRC_HOME)/$(TABLE) | $(CGG) $(CGGFLAGS)
-cmp tables.h tables.H || cp tables.H tables.h
lint: tables.c
$(LINT) $(LINTFLAGS) $(CFILES) tables.c
clean:
rm -f *.$(SUF) tables.c tables.h debug.out cg tables.H
codegen.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
codegen.$(SUF): $(CDIR)/data.h
codegen.$(SUF): $(CDIR)/equiv.h
codegen.$(SUF): $(CDIR)/extern.h
codegen.$(SUF): $(CDIR)/param.h
codegen.$(SUF): $(CDIR)/result.h
codegen.$(SUF): $(CDIR)/state.h
codegen.$(SUF): tables.h
codegen.$(SUF): $(CDIR)/types.h
compute.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
compute.$(SUF): $(CDIR)/data.h
compute.$(SUF): $(CDIR)/extern.h
compute.$(SUF): $(CDIR)/glosym.h
compute.$(SUF): $(CDIR)/label.h
compute.$(SUF): $(CDIR)/param.h
compute.$(SUF): $(CDIR)/result.h
compute.$(SUF): tables.h
compute.$(SUF): $(CDIR)/types.h
equiv.$(SUF): $(CDIR)/assert.h
equiv.$(SUF): $(CDIR)/data.h $(TARGET_HOME)/h/cgg_cg.h
equiv.$(SUF): $(CDIR)/equiv.h
equiv.$(SUF): $(CDIR)/extern.h
equiv.$(SUF): $(CDIR)/param.h
equiv.$(SUF): $(CDIR)/result.h
equiv.$(SUF): tables.h
equiv.$(SUF): $(CDIR)/types.h
fillem.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
fillem.$(SUF): $(CDIR)/data.h
fillem.$(SUF): $(CDIR)/extern.h
fillem.$(SUF): $(SRC_DIR)/mach.c
fillem.$(SUF): $(SRC_DIR)/mach.h
fillem.$(SUF): $(CDIR)/param.h
fillem.$(SUF): $(CDIR)/regvar.h
fillem.$(SUF): $(CDIR)/result.h
fillem.$(SUF): tables.h
fillem.$(SUF): $(CDIR)/types.h
gencode.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
gencode.$(SUF): $(CDIR)/data.h
gencode.$(SUF): $(CDIR)/extern.h
gencode.$(SUF): $(CDIR)/param.h
gencode.$(SUF): $(CDIR)/result.h
gencode.$(SUF): tables.h
gencode.$(SUF): $(CDIR)/types.h
glosym.$(SUF): $(CDIR)/glosym.h
glosym.$(SUF): $(CDIR)/param.h
glosym.$(SUF): tables.h
glosym.$(SUF): $(CDIR)/types.h
label.$(SUF): $(CDIR)/label.h
label.$(SUF): $(CDIR)/param.h
label.$(SUF): tables.h
label.$(SUF): $(CDIR)/types.h
main.$(SUF): $(CDIR)/param.h
main.$(SUF): tables.h
move.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
move.$(SUF): $(CDIR)/data.h
move.$(SUF): $(CDIR)/extern.h
move.$(SUF): $(CDIR)/param.h
move.$(SUF): $(CDIR)/result.h
move.$(SUF): tables.h
move.$(SUF): $(CDIR)/types.h
nextem.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
nextem.$(SUF): $(CDIR)/data.h
nextem.$(SUF): $(CDIR)/extern.h
nextem.$(SUF): $(CDIR)/param.h
nextem.$(SUF): $(CDIR)/result.h
nextem.$(SUF): tables.h
nextem.$(SUF): $(CDIR)/types.h
reg.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
reg.$(SUF): $(CDIR)/data.h
reg.$(SUF): $(CDIR)/extern.h
reg.$(SUF): $(CDIR)/param.h
reg.$(SUF): $(CDIR)/result.h
reg.$(SUF): tables.h
reg.$(SUF): $(CDIR)/types.h
regvar.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
regvar.$(SUF): $(CDIR)/data.h
regvar.$(SUF): $(CDIR)/extern.h
regvar.$(SUF): $(CDIR)/param.h
regvar.$(SUF): $(CDIR)/regvar.h
regvar.$(SUF): $(CDIR)/result.h
regvar.$(SUF): tables.h
regvar.$(SUF): $(CDIR)/types.h
salloc.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
salloc.$(SUF): $(CDIR)/data.h
salloc.$(SUF): $(CDIR)/extern.h
salloc.$(SUF): $(CDIR)/param.h
salloc.$(SUF): $(CDIR)/result.h
salloc.$(SUF): tables.h
salloc.$(SUF): $(CDIR)/types.h
state.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
state.$(SUF): $(CDIR)/data.h
state.$(SUF): $(CDIR)/extern.h
state.$(SUF): $(CDIR)/param.h
state.$(SUF): $(CDIR)/result.h
state.$(SUF): $(CDIR)/state.h
state.$(SUF): tables.h
state.$(SUF): $(CDIR)/types.h
subr.$(SUF): $(CDIR)/assert.h $(TARGET_HOME)/h/cgg_cg.h
subr.$(SUF): $(CDIR)/data.h
subr.$(SUF): $(CDIR)/extern.h
subr.$(SUF): $(CDIR)/param.h
subr.$(SUF): $(CDIR)/result.h
subr.$(SUF): tables.h
subr.$(SUF): $(CDIR)/types.h
var.$(SUF): $(CDIR)/data.h $(TARGET_HOME)/h/cgg_cg.h
var.$(SUF): $(CDIR)/param.h
var.$(SUF): $(CDIR)/result.h
var.$(SUF): tables.h
var.$(SUF): $(CDIR)/types.h

View file

@ -1,4 +1,4 @@
Makefile
proto.make
queue.c
queue.h
top.c

49
mach/proto/top/proto.make Normal file
View file

@ -0,0 +1,49 @@
# $Header$
#PARAMS do not remove this line!
#MACH_DEFINE do not remove this or the next line!
MACH =
SRC_DIR = $(SRC_HOME)/mach/$(MACH)/top
LIBS=$(TARGET_HOME)/modules/lib/libstring.$(LIBSUF)
PREFLAGS=-I. -DNDEBUG
PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) $(COPTIONS)
LDFLAGS=$(PFLAGS) $(LDOPTIONS)
LINTFLAGS=$(PREFLAGS) $(LINTOPTIONS)
CDIR=$(SRC_HOME)/mach/proto/top
CFILES=$(CDIR)/top.c $(CDIR)/queue.c
OFILES=top.$(SUF) queue.$(SUF)
all: gen.c
make top
top: $(OFILES)
$(CC) $(LDFLAGS) $(OFILES) $(LIBS) -o top
top.$(SUF): $(CDIR)/top.c gen.c
$(CC) -c $(CFLAGS) $(CDIR)/top.c
queue.$(SUF): $(CDIR)/queue.c
$(CC) -c $(CFLAGS) $(CDIR)/queue.c
install: all
cp top $(TARGET_HOME)/lib.bin/$(MACH)/top
cmp: all
-cmp top $(TARGET_HOME)/lib.bin/$(MACH)/top
gen.c: $(SRC_DIR)/table
$(UTIL_HOME)/lib.bin/topgen $(SRC_DIR)/table
lint: $(CFILES) gen.c
$(LINT) $(LINTFLAGS) $(CFILES)
clean:
rm -f *.$(SUF) gen.c gen.h top
top.$(SUF): gen.h
top.$(SUF): $(CDIR)/top.h
top.$(SUF): $(CDIR)/queue.h
queue.$(SUF): $(CDIR)/queue.h