many changes, to make the make_* files more portable

This commit is contained in:
ceriel 1989-02-02 14:45:26 +00:00
parent 91853768f7
commit c52b10c115
4 changed files with 103 additions and 140 deletions

View file

@ -1,7 +1,7 @@
EM = ../../..
CEGLIB = $(EM)/lib/ceg
UTIL = $(CEGLIB)/util
UtilList = create_ofiles make_as make_obj make_own update_ceg
UtilList = make_as make_obj make_own
all:

View file

@ -5,80 +5,64 @@ Em = $(CEG)/EM_parser/as_EM_pars
ASMAIN = $(CEG)/assemble/as_assemble
BACK = $(CEG)/ce_back
AS = $(CEG)/as_parser
EVAL = $(CEG)/as_parser/eval
DEF = $(CEG)/defaults
CC = cc
CFLAGS = -O
AR = ar
LEXLIB = -ll
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h -I../back
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h -I../back
CFLAGS = -O $(IFILES)
CEG_LIBS = $(EM)/modules/lib/liballoc.a\
$(EM)/modules/lib/libprint.a\
$(EM)/modules/lib/libstring.a\
$(EM)/modules/lib/libsystem.a
.c.o : mach.h back/*h
( cd ce; $(CC) -c $(CFLAGS) $(IFILES) ../$*.c)
.c.o: mach.h back.a
cd ce ; $(CC) -c $(CFLAGS) ../$*.c ; cd ..
all: back ceg ce
make -f ce_makefile ce.a
all: back.a ce.a
install: all
../../install ce.a
../../install back.a
cmp: all
-../../compare ce.a
-../../compare back.a
clean:
rm -rf ce back ceg ce.a back.a Out
dclean:
rm -rf ce back ceg Out
ce : ceg/ceg EM_table mach.h
-mkdir ce
( cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table)
(cd ce; cp $(DEF)/*.c .)
(cd ce; cp $(DEF)/*/*.c .)
-ln mach.c ce/mach.c
@make -f ce_makefile EM_instr
ceg :
-mkdir ceg
(cd ceg; cp $(ASMAIN)/* .)
(cd ceg;$(CC) -c $(IFILES) *.c; $(AR) r as_lib.a *.o )
-(cd ceg; ranlib as_lib.a)
back :
-mkdir back
(cd back;cp $(BACK)/as_back/*h . )
(cd back;cp $(BACK)/as_back/Makefile .)
( cd back; make)
$(AR) r back.a back/*o
-ranlib back.a
ce.a : ce/*.o
ce.a : ce/dummy
$(AR) r ce.a ce/*.o
-ranlib ce.a
-sh -c 'ranlib ce.a'
ce/*.o : mach.h back/*.h
(cd ce;$(CC) -c $(CFLAGS) $(IFILES) *.c)
ce/dummy : ce/dummy1 mach.h back.a
cd ce;$(CC) -c $(CFLAGS) *.c; touch dummy ; cd ..
EM_instr : ceg/ceg mach.h back/*.h EM_table
( cd ce; $(EM)/lib/cpp -P ../EM_table | ../ceg/ceg -l)
( cd ce; $(CEG)/util/create_ofiles)
@make -f ce_makefile ce.a
ce/dummy1: ceg/ceg EM_table mach.h back.a
-mkdir ce
-ln mach.c ce/mach.c
cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table ; cp $(DEF)/*.c . ; cp $(DEF)/*/*.c . ; cd ..
cd ce; $(EM)/lib/cpp -P ../EM_table | ../ceg/ceg -l ; cd ..
touch ce/dummy1
ceg/as_lib.a:
-mkdir ceg
cd ceg; cp $(ASMAIN)/* . ; $(CC) -c $(IFILES) *.c; $(AR) r as_lib.a *.o ; cd ..
-sh -c 'ranlib ceg/as_lib.a'
ceg/ceg : ceg/as_lib.a ceg/eval_as.o # $(Em)/em_parser
(cd ceg; $(CC) -o ceg $(Em)/*.o eval_as.o as_lib.a $(CEG_LIBS) $(LEXLIB) )
back.a: mach.h
-mkdir back
cd back;cp $(BACK)/as_back/*h . ; cp $(BACK)/as_back/Makefile . ; make ; cd ..
$(AR) r back.a back/*o
-sh -c 'ranlib back.a'
ceg/eval_as.o : ceg/eval_as.c as.h # $(AS)/as_parser.h $(Em)/arg_type.h
(cd ceg;$(CC) -c $(IFILES) eval_as.c)
ceg/eval_as.c : as.c # $(EVAL)/eval
(cd ceg ; $(EVAL)/eval < ../as.c > eval_as.c )
ceg/ceg : ceg/as_lib.a # $(Em)/em_parser
cd ceg; $(CC) -o ceg $(Em)/*.o as_lib.a $(CEG_LIBS) $(LEXLIB) ; cd ..

View file

@ -10,83 +10,69 @@ DEF = $(CEG)/defaults
AR = ar
CC = cc
CFLAGS = -O
LEXLIB = -ll
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h -I../back
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h -I../back
CEG_LIBS = $(EM)/modules/lib/liballoc.a\
$(EM)/modules/lib/libprint.a\
$(EM)/modules/lib/libstring.a\
$(EM)/modules/lib/libsystem.a
.c.o : mach.h back/*h
( cd ce; $(CC) -c $(CFLAGS) $(IFILES) ../$*.c)
CFLAGS = -O $(IFILES)
all: back ceg ce
make -f ce_makefile ce.a
.c.o: mach.h back.a
cd ce ; $(CC) -c $(CFLAGS) ../$*.c ; cd ..
all: back.a ce.a
install: all
../../install ce.a
../../install back.a
cmp: all
-../../compare ce.a
-../../compare back.a
clean:
rm -rf ce back ceg ce.a back.a Out
rm -rf ce back ceg ce.a back.a Out
dclean:
rm -rf ce back ceg Out
ce : ceg/ceg EM_table mach.h
-mkdir ce
( cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table)
(cd ce; cp $(DEF)/*.c .)
(cd ce; cp $(DEF)/*/*.c .)
-ln mach.c ce/mach.c
@make -f ce_makefile EM_instr
ceg :
-mkdir ceg
(cd ceg; cp $(ASMAIN)/* .)
(cd ceg;$(CC) -c $(IFILES) *.c; $(AR) r as_lib.a *.o )
-(cd ceg; ranlib as_lib.a)
back :
-mkdir back
(cd back;cp $(BACK)/obj_back/*h . )
(cd back;cp $(BACK)/obj_back/Makefile .)
( cd back; make)
$(AR) r back.a back/*o;
-ranlib back.a
ce.a : ce/*.o
ce.a : ce/dummy
$(AR) r ce.a ce/*.o
-ranlib ce.a
-sh -c 'ranlib ce.a'
ce/*.o : mach.h back/*.h
(cd ce;$(CC) -c $(CFLAGS) $(IFILES) *.c)
ce/dummy : ce/dummy1 mach.h back.a
cd ce;$(CC) -c $(CFLAGS) *.c; touch dummy ; cd ..
EM_instr : ceg/ceg mach.h back/*.h EM_table
( cd ce; $(EM)/lib/cpp -P ../EM_table | ../ceg/ceg -l)
( cd ce; $(CEG)/util/create_ofiles)
@make -f ce_makefile ce.a
ce/dummy1: ceg/ceg EM_table mach.h back.a
-mkdir ce
-ln mach.c ce/mach.c
cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table ; cp $(DEF)/*.c . ; cp $(DEF)/*/*.c . ; cd ..
cd ce; $(EM)/lib/cpp -P ../EM_table | ../ceg/ceg -l ; cd ..
touch ce/dummy1
back.a: mach.h
-mkdir back
cd back;cp $(BACK)/obj_back/*h . ; cp $(BACK)/obj_back/Makefile . ; make; cd ..
$(AR) r back.a back/*o;
-sh -c 'ranlib back.a'
ceg/ceg : ceg/as_lib.a ceg/as_instr.o ceg/eval_as.o # $(Em)/em_parser
(cd ceg; $(CC) -o ceg $(Em)/*.o as_instr.o eval_as.o as_lib.a $(CEG_LIBS) $(LEXLIB) )
ceg/ceg : ceg/as_lib.a ceg/as_instr.o ceg/eval_as.o # $(Em)/em_parser
cd ceg; $(CC) -o ceg $(Em)/*.o as_instr.o eval_as.o as_lib.a $(CEG_LIBS) $(LEXLIB) ; cd ..
ceg/as_lib.a:
-mkdir ceg
cd ceg; cp $(ASMAIN)/* . ; $(CC) -c $(IFILES) *.c; $(AR) r as_lib.a *.o ; touch dummy ; cd ..
-sh -c 'ranlib ceg/as_lib.a'
ceg/eval_as.o : ceg/eval_as.c as.h # $(AS)/as_parser.h $(Em)/arg_type.h
(cd ceg;$(CC) -c $(IFILES) eval_as.c)
cd ceg;$(CC) -c $(IFILES) eval_as.c ; cd ..
ceg/eval_as.c : as.c # $(EVAL)/eval
(cd ceg; $(EVAL)/eval < ../as.c > eval_as.c )
cd ceg; $(EVAL)/eval < ../as.c > eval_as.c ; cd ..
ceg/as_instr.o : as.h ceg/*h ceg/as_instr.c
(cd ceg;$(CC) -c $(IFILES) as_instr.c)
ceg/as_instr.o : as.h ceg/dummy ceg/as_instr.c
cd ceg;$(CC) -c $(IFILES) as_instr.c ; cd ..
ceg/as_instr.c : as_table # $(AS)/as_parser
(cd ceg; $(EM)/lib/cpp -P ../as_table| $(AS)/as_parser > as_instr.c)
cd ceg; $(EM)/lib/cpp -P ../as_table| $(AS)/as_parser > as_instr.c ; cd ..

View file

@ -8,77 +8,70 @@ EVAL = $(CEG)/as_parser/eval
DEF = $(CEG)/defaults
CC = cc
CFLAGS = -O
AR = ar
LEXLIB = -ll
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h -I../back
IFILES = -I. -I.. -I$(AS) -I$(Em) -I$(EM)/h -I$(EM)/modules/h -I../back
CFLAGS = -O $(IFILES)
CEG_LIBS = $(EM)/modules/lib/liballoc.a\
$(EM)/modules/lib/libprint.a\
$(EM)/modules/lib/libstring.a\
$(EM)/modules/lib/libsystem.a
.c.o : mach.h back/*h ; ( cd ce; $(CC) -c $(CFLAGS) $(IFILES) ../$*.c)
.c.o: mach.h back.a
ce ce ; $(CC) -c $(CFLAGS) ../$*.c ; cd ..
all: back ceg ce
make -f ce_makefile ce.a
all: back.a ce.a
install: all
../../install ce.a
../../install back.a
cmp: all
-../../compare ce.a
-../../compare back.a
clean:
rm -rf ce ceg ce.a back.a Out
rm -rf ce ceg ce.a back.a Out
dclean:
rm -rf ce ceg Out
ce : ceg/ceg EM_table mach.h
-mkdir ce
( cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table)
(cd ce;cp $(DEF)/*.c .)
(cd ce;cp $(DEF)/*/*.c .)
-ln mach.c ce/mach.c
@make -f ce_makefile EM_instr
ceg :
-mkdir ceg
(cd ceg; cp $(ASMAIN)/* .)
(cd ceg;$(CC) -c $(IFILES) *.c; $(AR) r as_lib.a *.o )
-(cd ceg; ranlib as_lib.a)
ce.a : ce/*.o
ce.a : ce/dummy
$(AR) r ce.a ce/*.o
-ranlib ce.a
-sh -c 'ranlib ce.a'
ce/*.o : mach.h
(cd ce;$(CC) -c $(CFLAGS) $(IFILES) ../$*.c)
ce/dummy : ce/dummy1 mach.h back.a
cd ce;$(CC) -c $(CFLAGS) *.c; touch dummy ; cd ..
EM_instr : ceg/ceg EM_table mach.h
( cd ce; $(EM)/lib/cpp -P ../EM_table| ../ceg/ceg -l)
( cd ce; $(CEG)/util/create_ofiles)
@make -f ce_makefile ce.a
ce/dummy1: ceg/ceg EM_table mach.h back.a
-mkdir ce
-ln mach.c ce/mach.c
cd ce; ../ceg/ceg -l < $(DEF)/not_impl/not_impl_table ; cp $(DEF)/*.c . ; cp $(DEF)/*/*.c . ; cd ..
cd ce; $(EM)/lib/cpp -P ../EM_table | ../ceg/ceg -l ; cd ..
touch ce/dummy1
ceg/as_lib.a:
-mkdir ceg
cd ceg; cp $(ASMAIN)/* . ; touch dummy ; $(CC) -c $(IFILES) *.c; $(AR) r as_lib.a *.o ; cd ..
-sh -c 'ranlib ceg/as_lib.a'
ceg/ceg : ceg/assemble.o ceg/as_instr.o ceg/eval_as.o # $(Em)/em_parser
cd ceg ; $(CC) -o ceg $(Em)/*.o assemble.o as_instr.o eval_as.o as_lib.a $(CEG_LIBS) $(LEXLIB) ; cd ..
ceg/ceg : ceg/assemble.o ceg/as_instr.o ceg/eval_as.o # $(Em)/em_parser
(cd ceg ; $(CC) -o ceg $(Em)/*.o assemble.o as_instr.o eval_as.o as_lib.a\
$(CEG_LIBS) $(LEXLIB) )
ceg/assemble.o : as.h ceg/assemble.c ceg/*h
(cd ceg;$(CC) -c $(IFILES) assemble.c)
ceg/assemble.o : as.h ceg/assemble.c ceg/dummy
cd ceg;$(CC) -c $(IFILES) assemble.c ; cd ..
ceg/as_instr.o : as.h ceg/*h ceg/as_instr.c
(cd ceg;$(CC) -c $(IFILES) as_instr.c)
cd ceg;$(CC) -c $(IFILES) as_instr.c ; cd ..
ceg/as_instr.c : as_table # $(AS)/as_parser
(cd ceg ; $(EM)/lib/cpp -P ../as_table| $(AS)/as_parser > as_instr.c )
cd ceg ; $(EM)/lib/cpp -P ../as_table| $(AS)/as_parser > as_instr.c ; cd ..
ceg/eval_as.o : ceg/eval_as.c as.h # $(AS)/as_parser.h $(Em)/arg_type.h
(cd ceg;$(CC) -c $(IFILES) eval_as.c)
cd ceg;$(CC) -c $(IFILES) eval_as.c ; cd ..
ceg/eval_as.c : as.c # $(EVAL)/eval
( cd ceg ; $(EVAL)/eval < ../as.c > eval_as.c )
cd ceg ; $(EVAL)/eval < ../as.c > eval_as.c ; cd ..