258 lines
5.7 KiB
Plaintext
258 lines
5.7 KiB
Plaintext
#if 0
|
|
#makefile.unx 10-Jul-96
|
|
#endif
|
|
|
|
VPATH=$(V_VPATH)
|
|
|
|
O=.o
|
|
C=.c
|
|
|
|
V_H=0
|
|
V_L=97
|
|
P_L=9
|
|
|
|
#define D_P_L 1
|
|
DISTRIB=mars_nwe
|
|
#if D_P_L
|
|
DISTRIBF=$(DISTRIB)-$(V_H).$(V_L).pl$(P_L)
|
|
PATCHF=$(DISTRIBF)
|
|
#else
|
|
P_L=0
|
|
DISTRIBF=$(DISTRIB)-$(V_H).$(V_L)
|
|
PATCHF=$(DISTRIBF).pl$(P_L)
|
|
#endif
|
|
STERN=*
|
|
|
|
#if 0
|
|
DESTMAKEFILE=Makefile.o
|
|
all: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
routed: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
clean: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
distclean: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
install: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
reboot: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
install_ini: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
diff: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
distrib: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
distrib_bin: $(DESTMAKEFILE)
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
$(DESTMAKEFILE): $(VPATH)/makefile.unx $(VPATH)/config.h
|
|
rm -f $@
|
|
cp $(VPATH)/makefile.unx makefile.c
|
|
$(CPP) $(HOSTCFLAGS) -I$(VPATH) makefile.c > $@
|
|
rm -f makefile.c
|
|
#endif
|
|
|
|
|
|
PROG1=
|
|
PROG2=nwserv
|
|
PROG3=nwconn
|
|
PROG4=ncpserv
|
|
PROG5=nwclient
|
|
PROG6=nwbind
|
|
PROG7=nwrouted
|
|
|
|
#include "config.h"
|
|
#ifdef FILENAME_NW_INI
|
|
M_FILENAME_NW_INI=FILENAME_NW_INI
|
|
#else
|
|
M_FILENAME_NW_INI="./nw.ini"
|
|
#endif
|
|
|
|
#ifdef PATHNAME_PROGS
|
|
M_PATHNAME_PROGS=PATHNAME_PROGS
|
|
#else
|
|
M_PATHNAME_PROGS="."
|
|
#endif
|
|
|
|
#ifndef INTERNAL_RIP_SAP
|
|
#define INTERNAL_RIP_SAP 1
|
|
#endif
|
|
|
|
#ifdef LINUX
|
|
EMUTLIOBJ=emutli$(O)
|
|
EMUTLIOBJ1=emutli1$(O)
|
|
# if INTERNAL_RIP_SAP
|
|
NWROUTE_O=nwroute$(O)
|
|
# else
|
|
NWROUTE_O=nwroute1$(O)
|
|
NWROUTED=$(PROG7)
|
|
# endif
|
|
#else
|
|
NWROUTE_O=nwroute1$(O)
|
|
#endif
|
|
|
|
PROGS=$(PROG1) $(PROG2) $(PROG3) $(PROG4) $(PROG5) $(PROG6) $(NWROUTED)
|
|
|
|
OBJ1= $(EMUTLIOBJ) net1$(O) tools$(O)
|
|
OBJ2= $(OBJ1) $(EMUTLIOBJ1) $(NWROUTE_O)
|
|
OBJ3= $(OBJ1) connect$(O) namspace$(O) nwvolume$(O) nwfile$(O) unxfile$(O) \
|
|
nwqueue$(O)
|
|
OBJ4= $(OBJ1)
|
|
OBJ5= $(OBJ1)
|
|
OBJ6= $(OBJ1) nwdbm$(O) nwcrypt$(O) unxlog$(O)
|
|
OBJ7= $(OBJ1) $(EMUTLIOBJ1)
|
|
|
|
OBJS= $(EMUTLIOBJ) net1$(O) tools$(O) \
|
|
$(EMUTLIOBJ1) $(NWROUTE_O) \
|
|
connect$(O) namspace$(O) nwvolume$(O) nwfile$(O) unxfile$(O)\
|
|
nwdbm$(O) nwcrypt$(O) unxlog$(O) \
|
|
$(PROG2)$(O) $(PROG3)$(O) $(PROG4)$(O) $(PROG5)$(O) $(PROG6)$(O) \
|
|
$(PROG7)$(O)
|
|
|
|
HOBJ3= $(PROG3)$(O) connect$(O) namspace$(O) nwvolume$(O) nwfile$(O) \
|
|
unxfile$(O)
|
|
|
|
#if 0
|
|
#$(PROG1): $(PROG1)$(O) $(OBJ1)
|
|
# $(CC) -o $(VPATH)/$(PROG1) $(PROG1)$(O) $(OBJ1) $(NSLLIB)
|
|
#endif
|
|
|
|
$(PROG2): $(PROG2)$(O) $(OBJ2)
|
|
$(CC) -o $(VPATH)/$(PROG2) $(PROG2)$(O) $(OBJ2) $(NSLLIB)
|
|
|
|
#if 0
|
|
#$(CC) -o $(VPATH)/$(PROG2) $(PROG2)$(O) $(OBJ2) $(NDBMLIB) $(NSLLIB)
|
|
#endif
|
|
|
|
$(PROG3): $(PROG3)$(O) $(OBJ3)
|
|
$(CC) -o $(VPATH)/$(PROG3) $(PROG3)$(O) $(OBJ3) $(NSLLIB)
|
|
|
|
$(PROG4): $(PROG4)$(O) $(OBJ4)
|
|
$(CC) -o $(VPATH)/$(PROG4) $(PROG4)$(O) $(OBJ4) $(NSLLIB)
|
|
|
|
$(PROG5): $(PROG5)$(O) $(OBJ5)
|
|
$(CC) -o $(VPATH)/$(PROG5) $(PROG5)$(O) $(OBJ5) $(NSLLIB)
|
|
|
|
$(PROG6): $(PROG6)$(O) $(OBJ6)
|
|
$(CC) -o $(VPATH)/$(PROG6) $(PROG6)$(O) $(OBJ6) $(NDBMLIB) $(CRYPTLIB) $(NSLLIB)
|
|
|
|
$(PROG7): $(PROG7)$(O) $(OBJ7) nwserv.c nwroute.c
|
|
$(CC) -o $(VPATH)/$(PROG7) $(PROG7)$(O) $(OBJ7) $(NSLLIB)
|
|
|
|
$(HOBJ3): namspace.h connect.h nwvolume.h nwfile.h
|
|
$(OBJS): net.h config.h
|
|
|
|
$(C)$(O):
|
|
$(CC) -c $(CFLAGS) $(HOSTCFLAGS)\
|
|
-D_VERS_H_=$(V_H) -D_VERS_L_=$(V_L) -D_VERS_P_=$(P_L) $<
|
|
|
|
n_all: $(PROGS)
|
|
@echo "don't forget to do a 'make install' as root !" >> $(VPATH)/.mk.notes
|
|
|
|
n_routed: $(PROG7)
|
|
|
|
n_install_ini:
|
|
cd $(VPATH) && $(INSTALL) -m 664 nw.ini $(M_FILENAME_NW_INI) && cd $(OBJDIR)
|
|
|
|
n_install:
|
|
cd $(VPATH) && $(INSTALL) -d $(M_PATHNAME_PROGS) && cd $(OBJDIR)
|
|
cd $(VPATH) && $(INSTALL) $(PROGS) $(M_PATHNAME_PROGS) && cd $(OBJDIR)
|
|
@cd $(VPATH) && (if [ -r $(M_FILENAME_NW_INI) ] ; then \
|
|
echo ""; \
|
|
echo "********************************************************"; \
|
|
echo ""; \
|
|
echo "$(M_FILENAME_NW_INI) exist."; \
|
|
echo "to overwrite it with nw.ini, make install_ini";\
|
|
echo ""; \
|
|
echo "********************************************************"; \
|
|
echo ""; \
|
|
else \
|
|
$(INSTALL) -m 664 nw.ini $(M_FILENAME_NW_INI); \
|
|
echo ""; \
|
|
echo "********************************************************"; \
|
|
echo ""; \
|
|
echo "$(M_FILENAME_NW_INI) created from nw.ini"; \
|
|
echo ""; \
|
|
echo "********************************************************"; \
|
|
echo ""; \
|
|
fi; cd $(OBJDIR) )
|
|
|
|
n_reboot: n_install
|
|
-nwserv -k
|
|
sleep 5
|
|
nwserv
|
|
|
|
clean_d:
|
|
cd $(VPATH) && (\
|
|
find $(DISTRIB) \( -name .e.pck -o -name '~*' -o -name '*~' -o -name core \) \
|
|
-exec rm {} \; \
|
|
; cd $(OBJDIR))
|
|
|
|
n_clean:
|
|
rm -f *.o
|
|
cd $(VPATH) && (rm -f $(PROGS) $(PROG7); cd $(OBJDIR) )
|
|
|
|
n_distclean: n_clean clean_d
|
|
cd $(VPATH) && (rm -f *.dir *.pag; cd $(OBJDIR))
|
|
|
|
make_dir:
|
|
cd $(VPATH) && (rm -rf $(OBJDIR)/$(VPATH)/$(DISTRIB) \
|
|
; mkdir $(DISTRIB) \
|
|
; mkdir $(DISTRIB)/examples \
|
|
; mkdir $(DISTRIB)/doc \
|
|
; ln -f \
|
|
$(STERN).[ch] \
|
|
makefile.unx \
|
|
Makefile \
|
|
COPYING \
|
|
README \
|
|
$(DISTRIB)/. \
|
|
; rm -f $(DISTRIB)/config.h \
|
|
; ln -f \
|
|
examples/$(STERN) \
|
|
$(DISTRIB)/examples/. \
|
|
; ln -f \
|
|
doc/$(STERN) \
|
|
$(DISTRIB)/doc/. \
|
|
; cd $(OBJDIR) )
|
|
|
|
n_diff: make_dir clean_d
|
|
cd $(VPATH) && ( \
|
|
makepatch org/$(DISTRIB) $(DISTRIB) > $(PATCHF) \
|
|
; gzip -9 -f $(PATCHF) \
|
|
; cd $(OBJDIR) )
|
|
|
|
n_distrib: n_diff
|
|
-mkdir /tmp/x
|
|
cd $(VPATH) && (tar cvzf $(DISTRIBF).tgz $(DISTRIB) \
|
|
; uue $(DISTRIBF).tgz; mv -f $(DISTRIB)-$(V_H).uue $(DISTRIBF).uue \
|
|
; cp -a $(DISTRIB)/doc/$(DISTRIB).lsm /tmp/yy \
|
|
; echo "" >> /tmp/yy \
|
|
; echo "" >> /tmp/yy \
|
|
; cat $(DISTRIBF).uue >> /tmp/yy \
|
|
; chmod 664 /tmp/yy \
|
|
; rm $(DISTRIBF).uue \
|
|
; mv $(DISTRIBF).tgz /tmp/x/. \
|
|
; cp -a $(DISTRIB)/doc/$(DISTRIB).lsm /tmp/x/. \
|
|
; cd $(OBJDIR) )
|
|
|
|
n_distrib_bin:
|
|
cd $(VPATH) && (tar cvzf /tmp/$(DISTRIB).bin.tgz \
|
|
$(PROGS) \
|
|
COPYING \
|
|
README \
|
|
examples \
|
|
doc \
|
|
; cd $(OBJDIR))
|
|
|