Added files in areacode/make

This commit is contained in:
fritz 1997-03-03 04:21:46 +00:00
parent cee09b6d7c
commit c7c975b285
3 changed files with 416 additions and 0 deletions

121
areacode/make/linux.mak Normal file
View File

@ -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

121
areacode/make/svr40.mak Normal file
View File

@ -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

174
areacode/make/watcom.mak Normal file
View File

@ -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