Adapted to the use of "convert.c"
authorceriel <none@none>
Thu, 5 Feb 1987 14:47:22 +0000 (14:47 +0000)
committerceriel <none@none>
Thu, 5 Feb 1987 14:47:22 +0000 (14:47 +0000)
util/misc/Makefile

index 32cd9ad..063d44a 100644 (file)
@@ -3,36 +3,50 @@
 d=../..
 h=$d/h
 l=$d/lib
+ml=$d/modules/lib
+mh=$d/modules/h
 
 DEC_PATH=decode
 ENC_PATH=encode
 DATA_PATH=$l/em_data.a
+DECLIBS=$(ml)/libread_emk.a $(ml)/libeme.a $(ml)/libprint.a $(ml)/libstring.a \
+       $(ml)/libsystem.a
+ENCLIBS=$(ml)/libread_emeV.a $(ml)/libemk.a $(ml)/libprint.a $(ml)/libstring.a \
+       $(ml)/libsystem.a
+HFILES=$h/em_mnem.h $h/em_spec.h $h/em_pseu.h $h/em_flag.h $h/em_ptyp.h  \
+       $h/em_mes.h $(mh)/em.h $(mh)/em_comp.h
 
-CFLAGS=-O -I$h
+CFLAGS=-O -I$(mh) -I$h
 
 all:            $(DEC_PATH) $(ENC_PATH)
 
 $(DEC_PATH):    decode.o $(DATA_PATH)
-               cc -n -o $(DEC_PATH) decode.o $(DATA_PATH)
+               cc -n -o $(DEC_PATH) decode.o $(DECLIBS) $(DATA_PATH)
 
 $(ENC_PATH):    encode.o $(DATA_PATH)
-               cc -n -o $(ENC_PATH) encode.o $(DATA_PATH)
+               cc -n -o $(ENC_PATH) encode.o $(ENCLIBS) $(DATA_PATH)
 
-encode.o:       $h/em_spec.h $h/em_pseu.h $h/em_flag.h $h/em_ptyp.h $h/em_mes.h
+convert.o:     $(HFILES)
 
-decode.o:       $h/em_spec.h $h/em_pseu.h $h/em_flag.h $h/em_ptyp.h $h/em_mes.h
+encode.o:      convert.o
+               cp convert.o encode.o
+
+decode.o:      convert.o
+               cp convert.o decode.o
 
 clean:
                rm -f $(DEC_PATH) $(ENC_PATH) *.o *.old
+
 install :       all
+               rm -f $l/em_$(DEC_PATH) $l/em_$(ENC_PATH)
                cp $(DEC_PATH) $l/em_$(DEC_PATH)
                cp $(ENC_PATH) $l/em_$(ENC_PATH)
 
 cmp :           all
-               cmp $(DEC_PATH) $l/$(DEC_PATH)
-               cmp $(ENC_PATH) $l/$(ENC_PATH)
+               cmp $(DEC_PATH) $l/em_$(DEC_PATH)
+               cmp $(ENC_PATH) $l/em_$(ENC_PATH)
 
 opr:
                make pr ^ opr
 pr:
-               @pr -n Makefile decode.c encode.c
+               @pr -n Makefile convert.c