diff --git a/areacode/make/linux.mak b/areacode/make/linux.mak new file mode 100644 index 00000000..eafb8528 --- /dev/null +++ b/areacode/make/linux.mak @@ -0,0 +1,121 @@ +# ***************************************************************************** +# * * +# * AREACODE Makefile for Linux * +# * * +# * (C) 1995-96 Ullrich von Bassewitz * +# * Wacholderweg 14 * +# * D-70597 Stuttgart * +# * EMail: uz@ibb.schwaben.com * +# * * +# ***************************************************************************** + + + +# $Id: linux.mak,v 1.1 1997/03/03 04:21:46 fritz Exp $ +# +# $Log: linux.mak,v $ +# Revision 1.1 1997/03/03 04:21:46 fritz +# Added files in areacode/make +# +# +# + + +# ------------------------------------------------------------------------------ +# Stuff you may want to edit + +# The name of the data file after installation + +DATATARGET=/usr/lib/areacodes + +# Command line for the installation of the data file +INSTALL = install -o bin -g bin -m 644 + +# ------------------------------------------------------------------------------ +# Definitions + +# Names of executables +AS = gas +AR = ar +LD = ld +ZIP = zip + +# Flags for the GNU C compiler +CFLAGS = -g -O2 -Wall + +# Name of the data file +DATASOURCE=areacode.dat + +# ------------------------------------------------------------------------------ +# Implicit rules + +.c.o: + gcc $(CFLAGS) -c $< + +# ------------------------------------------------------------------------------ +# + +ifeq (.depend,$(wildcard .depend)) +all: actest acvers +include .depend +else +all: depend +endif + + +actest: areacode.o actest.o + gcc -o actest areacode.o actest.o + +acvers: acvers.o + gcc -o acvers acvers.o + +areacode.o: areacode.h areacode.c + gcc $(CFLAGS) -DDATA_FILENAME="\"$(DATATARGET)\"" \ + -DCHARSET_ISO -c -o areacode.o areacode.c + +install: areacode.o acvers + @if [ `id -u` != 0 ]; then \ + echo ""; \ + echo 'Do "make install" as root'; \ + echo ""; \ + false; \ + fi + @if [ -f $(DATATARGET) ]; then \ + NewVersion=`./acvers $(DATASOURCE) | awk '{ print $$3 }'`;\ + OldVersion=`./acvers $(DATATARGET) | awk '{ print $$3 }'`;\ + echo "Current datafile build number: $$OldVersion"; \ + echo "Build number of new datafile: $$NewVersion"; \ + if [ $$NewVersion -gt $$OldVersion ]; then \ + echo "Installing new datafile"; \ + $(INSTALL) $(DATASOURCE) $(DATATARGET); \ + else \ + echo "Installed datafile is same or newer, skipping...";\ + fi; \ + else \ + echo "Installing new datafile"; \ + $(INSTALL) $(DATASOURCE) $(DATATARGET); \ + fi + +# ------------------------------------------------------------------------------ +# Create a dependency file + +depend dep: .depend + +.depend: + @echo "Creating dependency information" + $(CC) -MM *.c > .depend + +# ------------------------------------------------------------------------------ +# clean up + +distclean: zap + +clean: + -rm -f *.bak *~ *.o + -rm -f acvers actest + +zap: clean + -rm -f .depend + -rm -f *.o + + diff --git a/areacode/make/svr40.mak b/areacode/make/svr40.mak new file mode 100644 index 00000000..4b9567ce --- /dev/null +++ b/areacode/make/svr40.mak @@ -0,0 +1,121 @@ +# ***************************************************************************** +# * * +# * AREACODE Makefile for SVR4 * +# * * +# * (C) 1995-96 Ullrich von Bassewitz * +# * Wacholderweg 14 * +# * D-70597 Stuttgart * +# * EMail: uz@ibb.schwaben.com * +# * * +# * * +# * SVR40 Port by Felix Blank (felix@tasha.muc.de) * +# * * +# ***************************************************************************** + + + +# $Id: svr40.mak,v 1.1 1997/03/03 04:21:46 fritz Exp $ +# +# $Log: svr40.mak,v $ +# Revision 1.1 1997/03/03 04:21:46 fritz +# Added files in areacode/make +# +# +# + + +# ------------------------------------------------------------------------------ +# Stuff you may want to edit + +# The name of the data file after installation +DATATARGET=/usr/local/lib/areacodes + +# Command line for the installation of the data file +INSTALL = install -o bin -g bin -m 644 + +# ------------------------------------------------------------------------------ +# Definitions + +# Names of executables +AS = gas +AR = ar +LD = ld +ZIP = zip +CC = gcc + +# Flags for the GNU C compiler +CFLAGS=-O2 -Wall + +# Name of the data file +DATASOURCE=areacode.dat + +# ------------------------------------------------------------------------------ +# Implicit rules + +.c.o: + gcc $(CFLAGS) -c $< + +# ------------------------------------------------------------------------------ +# + +ifeq (.depend,$(wildcard .depend)) +all: actest acvers +include .depend +else +all: depend +endif + + +actest: areacode.o actest.o + gcc -o actest areacode.o actest.o + +acvers: acvers.o + gcc -o acvers acvers.o + +areacode.o: areacode.h areacode.c + gcc $(CFLAGS) -DDATA_FILENAME="\"$(DATATARGET)\"" \ + -DCHARSET_ISO -c -o areacode.o areacode.c + +install: areacode.o acvers + @if [ `id -u` != 0 ]; then \ + echo ""; \ + echo 'Do "make install" as root'; \ + echo ""; \ + false; \ + fi + @if [ -f $(DATATARGET) ]; then \ + NewVersion=`./acvers $(DATASOURCE) | awk '{ print $$3 }'`;\ + OldVersion=`./acvers $(DATATARGET) | awk '{ print $$3 }'`;\ + echo "Current datafile build number: $$OldVersion"; \ + echo "Build number of new datafile: $$NewVersion"; \ + if [ $$NewVersion -gt $$OldVersion ]; then \ + echo "Installing new datafile"; \ + $(INSTALL) $(DATASOURCE) $(DATATARGET); \ + else \ + echo "Installed datafile is same or newer, skipping...";\ + fi; \ + else \ + echo "Installing new datafile"; \ + $(INSTALL) $(DATASOURCE) $(DATATARGET); \ + fi + +# ------------------------------------------------------------------------------ +# Create a dependency file + +depend dep: + @echo "Creating dependency information" + $(CC) -MM *.c > .depend + +# ------------------------------------------------------------------------------ +# clean up + +distclean: zap + +clean: + -rm *.bak *~ + +zap: clean + -rm *.o + -rm .depend + + diff --git a/areacode/make/watcom.mak b/areacode/make/watcom.mak new file mode 100644 index 00000000..51af6cea --- /dev/null +++ b/areacode/make/watcom.mak @@ -0,0 +1,174 @@ +# ***************************************************************************** +# * * +# * AREACODE Makefile * +# * * +# * (C) 1996 Ullrich von Bassewitz * +# * Wacholderweg 14 * +# * D-70597 Stuttgart * +# * EMail: uz@ibb.schwaben.com * +# * * +# ***************************************************************************** + + + +# $Id: watcom.mak,v 1.1 1997/03/03 04:21:47 fritz Exp $ +# +# $Log: watcom.mak,v $ +# Revision 1.1 1997/03/03 04:21:47 fritz +# Added files in areacode/make +# +# +# + + + +# ------------------------------------------------------------------------------ +# Generelle Einstellungen + +.AUTODEPEND +.SUFFIXES .ASM .C .CC .CPP +.SWAP + +# ------------------------------------------------------------------------------ +# Allgemeine Definitionen + +# Names of executables +AS = TASM +AR = WLIB +LD = WLINK +!if $d(__OS2__) +ZIP = zip +MV = c:\os2\4os2\4os2 /C MOVE /Q +!else +ZIP = pkzip +MV = mv +!endif + + +!if !$d(TARGET) +!if $d(__OS2__) +TARGET = OS2 +!else +TARGET = DOS +!endif +!endif + +LIBDIR= ..\spunk +INCDIR= ..\spunk + + +# target specific macros. +!if $(TARGET)==OS2 + +# --------------------- OS2 --------------------- +SYSTEM = os2v2 +CPP = WPP386 +CC = WCC386 +CCCFG = -bm -bt=$(TARGET) -d$(TARGET) -i=$(INCDIR) -d2 -onatx -zp4 -5 -fpi87 -zq -w2 -ze + +!elif $(TARGET)==DOS32 + +# -------------------- DOS4G -------------------- +SYSTEM = dos4g +CPP = WPP386 +CC = WCC386 +CCCFG = -bt=$(TARGET) -d$(TARGET) -i=$(INCDIR) -d2 -onatx -zp4 -5 -fpi -zq -w2 -ze + +!elif $(TARGET)==DOS + +# --------------------- DOS --------------------- +SYSTEM = dos +CPP = WPP +CC = WCC +# Optimize for size when running under plain DOS, but use 286 code. Don't +# include ANY debugging code to make as many programs runable under plain DOS +# as possible. +CCCFG = -bt=$(TARGET) -d$(TARGET) -dSPUNK_NODEBUG -i=$(INCDIR) -d1 -oailmns -s -zp2 -zc -2 -fp2 -ml -zq -w2 -ze -zt255 + +!elif $(TARGET)==NETWARE + +# --------------------- NETWARE ------------------- +SYSTEM = netware +CPP = WPP386 +CC = WCC386 +CCCFG = -bm -bt=$(TARGET) -d$(TARGET) -i=$(INCDIR) -d1 -onatx -zp4 -5 -fpi -zq -w2 -ze + +!elif $(TARGET)==NT + +# --------------------- NT ---------------------- +SYSTEM = nt +CPP = WPP386 +CC = WCC386 +CCCFG = -bm -bt=$(TARGET) -d$(TARGET) -i=$(INCDIR) -d1 -onatx -zp4 -5 -fpi87 -zq -w2 -ze + +!else +!error +!endif + +LIB = $(LIBDIR)\$(TARGET)\SPUNK.LIB + +# ------------------------------------------------------------------------------ +# Implicit rules + +.c.obj: + $(CC) $(CCCFG) $< + +.cc.obj: + $(CPP) $(CCCFG) $< + +# -------------------------------------------------------------------- + +all: actest acvers + +actest: actest.exe + +acvers: acvers.exe + +os2: + $(MAKE) -DTARGET=OS2 + +nt: + $(MAKE) -DTARGET=NT + +dos32: + $(MAKE) -DTARGET=DOS32 + +dos: + $(MAKE) -DTARGET=DOS + +# -------------------------------------------------------------------- +# actest + +actest.exe: areacode.obj \ + actest.obj + -@copy makefile make\watcom.mak > nul + $(LD) system $(SYSTEM) @&&| +DEBUG all +NAME actest.exe +OPTION DOSSEG +OPTION STACK=32K +FILE areacode.obj +FILE actest.obj +| + +acvers.exe: acvers.obj + -@copy makefile make\watcom.mak > nul + $(LD) system $(SYSTEM) @&&| +DEBUG all +NAME acvers.exe +OPTION DOSSEG +OPTION STACK=32K +FILE acvers.obj +| + +# ------------------------------------------------------------------------------ +# Aufr„umen + +clean: + -del *.bak + +zap: clean + -del *.obj + -del *.mbr + -del *.dbr +