196 lines
4.0 KiB
Plaintext
196 lines
4.0 KiB
Plaintext
# makefile.unx 15-Nov-95
|
|
VPATH=..
|
|
O=.o
|
|
C=.c
|
|
|
|
DEBUG=-DDB
|
|
V_H=0
|
|
V_L=95
|
|
DISTRIB=mars_nwe
|
|
PATCHF=$(DISTRIB)p$(V_H).$(V_L)
|
|
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
|
|
|
|
|
|
PROG1=netinit
|
|
PROG2=nwserv
|
|
PROG3=nwconn
|
|
PROG4=ncpserv
|
|
PROG5=nwclient
|
|
|
|
#ifdef LINUX
|
|
EMUTLIOBJ=emutli$(O)
|
|
PROG1=
|
|
NDBMLIB=-ldbm
|
|
NSLLIB=
|
|
#else
|
|
NDBMLIB=/usr/ucblib/libucb.a
|
|
NSLLIB=-lnsl
|
|
#endif
|
|
|
|
PROGS=$(PROG1) $(PROG2) $(PROG3) $(PROG4) $(PROG5)
|
|
|
|
|
|
#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
|
|
|
|
OBJ1= $(EMUTLIOBJ) net1$(O) tools$(O)
|
|
OBJ2= $(OBJ1)
|
|
#nwdbm$(O)
|
|
OBJ3= $(OBJ1) connect$(O)
|
|
OBJ4= $(OBJ1) nwdbm$(O)
|
|
OBJ5= $(OBJ1)
|
|
|
|
OBJS= net1$(O) tools$(O) connect$(O) nwdbm$(O) \
|
|
$(PROG2)$(O) $(PROG3)$(O) $(PROG4)$(O) $(PROG5)$(O)
|
|
|
|
$(PROG1): $(PROG1)$(O) $(OBJ1)
|
|
$(CC) -o ../$(PROG1) $(PROG1)$(O) $(OBJ1) $(NSLLIB)
|
|
|
|
$(PROG2): $(PROG2)$(O) $(OBJ2)
|
|
$(CC) -o ../$(PROG2) $(PROG2)$(O) $(OBJ2) $(NSLLIB)
|
|
|
|
#$(CC) -o ../$(PROG2) $(PROG2)$(O) $(OBJ2) $(NDBMLIB) $(NSLLIB)
|
|
|
|
$(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)
|
|
|
|
$(OBJS): net.h config.h
|
|
|
|
$(C)$(O):
|
|
$(CC) -c $(CFLAGS) $(HOSTCFLAGS) $(DEBUG) -D_VERSION_H_=$(V_H) -D_VERSION_L_=$(V_L) $<
|
|
|
|
n_all: $(PROGS)
|
|
|
|
n_install_ini:
|
|
cd .. && install -m 664 nw.ini $(M_FILENAME_NW_INI) && cd obj
|
|
|
|
n_install:
|
|
cd .. && install -d $(M_PATHNAME_PROGS) && cd obj
|
|
cd .. && install $(PROGS) $(M_PATHNAME_PROGS) && cd obj
|
|
@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 \
|
|
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 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)
|
|
|
|
n_diff: n_clean1
|
|
cd .. && (rm -rf obj/../$(DISTRIB) \
|
|
; mkdir $(DISTRIB) \
|
|
; mkdir $(DISTRIB)/examples \
|
|
; ln -f \
|
|
$(STERN).[ch] \
|
|
makefile.unx \
|
|
Makefile \
|
|
COPYING \
|
|
README \
|
|
README.ger \
|
|
INSTALL \
|
|
$(DISTRIB).lsm \
|
|
$(DISTRIB)/. \
|
|
; ln -f \
|
|
examples/$(STERN) \
|
|
$(DISTRIB)/examples/. \
|
|
; makepatch $(DISTRIB).org $(DISTRIB) > $(PATCHF) \
|
|
; gzip -9 -f $(PATCHF) \
|
|
; cd obj )
|
|
|
|
n_distrib: n_diff
|
|
-mkdir /tmp/x
|
|
cd .. && (tar cvzf $(DISTRIB).tgz $(DISTRIB) \
|
|
; uue $(DISTRIB).tgz \
|
|
; cp -a $(DISTRIB)/$(DISTRIB).lsm /tmp/yy \
|
|
; echo "" >> /tmp/yy \
|
|
; echo "" >> /tmp/yy \
|
|
; cat $(DISTRIB).uue >> /tmp/yy \
|
|
; chmod 664 /tmp/yy \
|
|
; rm $(DISTRIB).uue \
|
|
; mv $(DISTRIB).tgz /tmp/x/. \
|
|
; cp -a $(DISTRIB)/$(DISTRIB).lsm /tmp/x/. \
|
|
; cd obj )
|
|
|
|
n_distrib_bin:
|
|
cd .. && (tar cvzf /tmp/$(DISTRIB).bin.tgz \
|
|
$(PROGS) \
|
|
COPYING \
|
|
INSTALL \
|
|
README \
|
|
README.ger \
|
|
$(DISTRIB).lsm \
|
|
examples \
|
|
; cd obj)
|
|
|
|
|