2011-11-13 00:38:56 +01:00
|
|
|
#if 0
|
|
|
|
#makefile.unx 07-Feb-96
|
|
|
|
#endif
|
2011-11-13 00:38:55 +01:00
|
|
|
VPATH=..
|
|
|
|
O=.o
|
|
|
|
C=.c
|
|
|
|
|
|
|
|
DEBUG=-DDB
|
|
|
|
V_H=0
|
2011-11-13 00:38:55 +01:00
|
|
|
V_L=96
|
2011-11-13 00:38:56 +01:00
|
|
|
P_L=8
|
2011-11-13 00:38:55 +01:00
|
|
|
#define D_P_L 1
|
2011-11-13 00:38:55 +01:00
|
|
|
DISTRIB=mars_nwe
|
2011-11-13 00:38:55 +01:00
|
|
|
#if D_P_L
|
|
|
|
DISTRIBF=$(DISTRIB)-$(V_H).$(V_L).pl$(P_L)
|
|
|
|
PATCHF=$(DISTRIBF)
|
|
|
|
#else
|
|
|
|
P_L=0
|
2011-11-13 00:38:55 +01:00
|
|
|
DISTRIBF=$(DISTRIB)-$(V_H).$(V_L)
|
|
|
|
PATCHF=$(DISTRIBF).pl$(P_L)
|
2011-11-13 00:38:55 +01:00
|
|
|
#endif
|
2011-11-13 00:38:55 +01:00
|
|
|
STERN=*
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
DESTMAKEFILE=Makefile.o
|
|
|
|
all: $(DESTMAKEFILE)
|
|
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
|
|
|
|
clean: $(DESTMAKEFILE)
|
|
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
|
|
|
|
distclean: $(DESTMAKEFILE)
|
|
|
|
$(MAKE) -f $(DESTMAKEFILE) n_$@
|
|
|
|
|
|
|
|
install: $(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): makefile.unx config.h
|
|
|
|
rm -f $@
|
|
|
|
cp ../makefile.unx makefile.c
|
|
|
|
$(CPP) $(HOSTCFLAGS) -I$(VPATH) makefile.c > $@
|
|
|
|
rm -f makefile.c
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-11-13 00:38:56 +01:00
|
|
|
PROG1=
|
2011-11-13 00:38:55 +01:00
|
|
|
PROG2=nwserv
|
|
|
|
PROG3=nwconn
|
|
|
|
PROG4=ncpserv
|
|
|
|
PROG5=nwclient
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
2011-11-13 00:38:56 +01:00
|
|
|
#ifndef INTERNAL_RIP_SAP
|
|
|
|
#define INTERNAL_RIP_SAP 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef LINUX
|
|
|
|
EMUTLIOBJ=emutli$(O)
|
|
|
|
# if INTERNAL_RIP_SAP
|
|
|
|
NWROUTE_O=nwroute$(O)
|
|
|
|
# else
|
|
|
|
NWROUTE_O=nwroute1$(O)
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
NWROUTE_O=nwroute1$(O)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
PROGS=$(PROG1) $(PROG2) $(PROG3) $(PROG4) $(PROG5)
|
|
|
|
|
2011-11-13 00:38:55 +01:00
|
|
|
OBJ1= $(EMUTLIOBJ) net1$(O) tools$(O)
|
2011-11-13 00:38:56 +01:00
|
|
|
OBJ2= $(OBJ1) $(NWROUTE_O)
|
|
|
|
OBJ3= $(OBJ1) connect$(O) namspace$(O) nwvolume$(O) nwfile$(O)
|
2011-11-13 00:38:55 +01:00
|
|
|
OBJ4= $(OBJ1) nwdbm$(O) nwcrypt$(O)
|
2011-11-13 00:38:55 +01:00
|
|
|
OBJ5= $(OBJ1)
|
|
|
|
|
2011-11-13 00:38:56 +01:00
|
|
|
OBJS= net1$(O) tools$(O) connect$(O) nwdbm$(O) $(NWROUTE_O) \
|
2011-11-13 00:38:55 +01:00
|
|
|
namspace$(O) nwvolume$(O) \
|
2011-11-13 00:38:55 +01:00
|
|
|
$(PROG2)$(O) $(PROG3)$(O) $(PROG4)$(O) $(PROG5)$(O)
|
|
|
|
|
2011-11-13 00:38:56 +01:00
|
|
|
HOBJ3= $(PROG3)$(O) connect$(O) namspace$(O) nwvolume$(O) nwfile$(O)
|
2011-11-13 00:38:55 +01:00
|
|
|
|
2011-11-13 00:38:55 +01:00
|
|
|
$(PROG1): $(PROG1)$(O) $(OBJ1)
|
|
|
|
$(CC) -o ../$(PROG1) $(PROG1)$(O) $(OBJ1) $(NSLLIB)
|
|
|
|
|
|
|
|
$(PROG2): $(PROG2)$(O) $(OBJ2)
|
|
|
|
$(CC) -o ../$(PROG2) $(PROG2)$(O) $(OBJ2) $(NSLLIB)
|
2011-11-13 00:38:56 +01:00
|
|
|
#if 0
|
2011-11-13 00:38:55 +01:00
|
|
|
#$(CC) -o ../$(PROG2) $(PROG2)$(O) $(OBJ2) $(NDBMLIB) $(NSLLIB)
|
2011-11-13 00:38:56 +01:00
|
|
|
#endif
|
2011-11-13 00:38:55 +01:00
|
|
|
|
|
|
|
$(PROG3): $(PROG3)$(O) $(OBJ3)
|
|
|
|
$(CC) -o ../$(PROG3) $(PROG3)$(O) $(OBJ3) $(NSLLIB)
|
|
|
|
|
|
|
|
$(PROG4): $(PROG4)$(O) $(OBJ4)
|
|
|
|
$(CC) -o ../$(PROG4) $(PROG4)$(O) $(OBJ4) $(NDBMLIB) $(NSLLIB)
|
|
|
|
|
|
|
|
$(PROG5): $(PROG5)$(O) $(OBJ5)
|
|
|
|
$(CC) -o ../$(PROG5) $(PROG5)$(O) $(OBJ5) $(NSLLIB)
|
|
|
|
|
2011-11-13 00:38:56 +01:00
|
|
|
$(HOBJ3): namspace.h connect.h nwvolume.h nwfile.h
|
2011-11-13 00:38:55 +01:00
|
|
|
$(OBJS): net.h config.h
|
2011-11-13 00:38:55 +01:00
|
|
|
|
|
|
|
$(C)$(O):
|
2011-11-13 00:38:55 +01:00
|
|
|
$(CC) -c $(CFLAGS) $(HOSTCFLAGS) $(DEBUG)\
|
|
|
|
-D_VERS_H_=$(V_H) -D_VERS_L_=$(V_L) -D_VERS_P_=$(P_L) $<
|
2011-11-13 00:38:55 +01:00
|
|
|
|
|
|
|
n_all: $(PROGS)
|
|
|
|
|
|
|
|
n_install_ini:
|
2011-11-13 00:38:56 +01:00
|
|
|
cd .. && $(INSTALL) -m 664 nw.ini $(M_FILENAME_NW_INI) && cd obj
|
2011-11-13 00:38:55 +01:00
|
|
|
|
|
|
|
n_install:
|
2011-11-13 00:38:56 +01:00
|
|
|
cd .. && $(INSTALL) -d $(M_PATHNAME_PROGS) && cd obj
|
|
|
|
cd .. && $(INSTALL) $(PROGS) $(M_PATHNAME_PROGS) && cd obj
|
2011-11-13 00:38:55 +01:00
|
|
|
@cd .. && (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 \
|
2011-11-13 00:38:56 +01:00
|
|
|
$(INSTALL) -m 664 nw.ini $(M_FILENAME_NW_INI); \
|
2011-11-13 00:38:55 +01:00
|
|
|
echo ""; \
|
|
|
|
echo "********************************************************"; \
|
|
|
|
echo ""; \
|
|
|
|
echo "$(M_FILENAME_NW_INI) created from nw.ini"; \
|
|
|
|
echo ""; \
|
|
|
|
echo "********************************************************"; \
|
|
|
|
echo ""; \
|
|
|
|
fi; cd obj )
|
|
|
|
|
|
|
|
n_clean1:
|
|
|
|
cd .. && (rm -f ~* examples/~* examples/.e.pck; cd obj)
|
|
|
|
|
|
|
|
n_clean: n_clean1
|
|
|
|
rm -f *.o
|
|
|
|
cd .. && (rm -f $(PROGS); cd obj )
|
|
|
|
|
|
|
|
n_distclean: n_clean
|
|
|
|
cd .. && (rm -f *.dir *.pag; cd obj)
|
|
|
|
|
2011-11-13 00:38:55 +01:00
|
|
|
n_make_dir: n_clean1
|
2011-11-13 00:38:55 +01:00
|
|
|
cd .. && (rm -rf obj/../$(DISTRIB) \
|
|
|
|
; mkdir $(DISTRIB) \
|
|
|
|
; mkdir $(DISTRIB)/examples \
|
|
|
|
; ln -f \
|
|
|
|
$(STERN).[ch] \
|
|
|
|
makefile.unx \
|
|
|
|
Makefile \
|
|
|
|
COPYING \
|
2011-11-13 00:38:55 +01:00
|
|
|
CHANGES \
|
2011-11-13 00:38:55 +01:00
|
|
|
README \
|
|
|
|
README.ger \
|
|
|
|
INSTALL \
|
2011-11-13 00:38:55 +01:00
|
|
|
INSTALL.ger \
|
2011-11-13 00:38:55 +01:00
|
|
|
$(DISTRIB).lsm \
|
|
|
|
$(DISTRIB)/. \
|
2011-11-13 00:38:55 +01:00
|
|
|
; rm -f $(DISTRIB)/config.h \
|
2011-11-13 00:38:55 +01:00
|
|
|
; ln -f \
|
|
|
|
examples/$(STERN) \
|
|
|
|
$(DISTRIB)/examples/. \
|
2011-11-13 00:38:55 +01:00
|
|
|
; cd obj )
|
|
|
|
|
|
|
|
n_diff: n_make_dir
|
|
|
|
cd .. && ( \
|
|
|
|
makepatch $(DISTRIB).org $(DISTRIB) > $(PATCHF) \
|
2011-11-13 00:38:55 +01:00
|
|
|
; gzip -9 -f $(PATCHF) \
|
|
|
|
; cd obj )
|
|
|
|
|
|
|
|
n_distrib: n_diff
|
|
|
|
-mkdir /tmp/x
|
2011-11-13 00:38:55 +01:00
|
|
|
cd .. && (tar cvzf $(DISTRIBF).tgz $(DISTRIB) \
|
|
|
|
; uue $(DISTRIBF).tgz; mv -f $(DISTRIB)-$(V_H).uue $(DISTRIBF).uue \
|
2011-11-13 00:38:55 +01:00
|
|
|
; cp -a $(DISTRIB)/$(DISTRIB).lsm /tmp/yy \
|
|
|
|
; echo "" >> /tmp/yy \
|
|
|
|
; echo "" >> /tmp/yy \
|
2011-11-13 00:38:55 +01:00
|
|
|
; cat $(DISTRIBF).uue >> /tmp/yy \
|
2011-11-13 00:38:55 +01:00
|
|
|
; chmod 664 /tmp/yy \
|
2011-11-13 00:38:55 +01:00
|
|
|
; rm $(DISTRIBF).uue \
|
|
|
|
; mv $(DISTRIBF).tgz /tmp/x/. \
|
2011-11-13 00:38:55 +01:00
|
|
|
; cp -a $(DISTRIB)/$(DISTRIB).lsm /tmp/x/. \
|
|
|
|
; cd obj )
|
|
|
|
|
|
|
|
n_distrib_bin:
|
|
|
|
cd .. && (tar cvzf /tmp/$(DISTRIB).bin.tgz \
|
|
|
|
$(PROGS) \
|
|
|
|
COPYING \
|
|
|
|
INSTALL \
|
2011-11-13 00:38:55 +01:00
|
|
|
INSTALL.ger \
|
|
|
|
CHANGES \
|
2011-11-13 00:38:55 +01:00
|
|
|
README \
|
|
|
|
README.ger \
|
|
|
|
$(DISTRIB).lsm \
|
|
|
|
examples \
|
|
|
|
; cd obj)
|
|
|
|
|
|
|
|
|