blob: 0c0ee552e2ec2e921f01f965db9a8e701d02472c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
--- areacode/make/freebsd.mak.orig Tue Sep 6 09:54:20 2005
+++ areacode/make/freebsd.mak Tue Sep 6 09:54:20 2005
@@ -0,0 +1,115 @@
+# *****************************************************************************
+# * *
+# * AREACODE Makefile for Freebsd *
+# * *
+# * (C) 1995-97 Ullrich von Bassewitz *
+# * Wacholderweg 14 *
+# * D-70597 Stuttgart *
+# * EMail: uz@ibb.schwaben.com *
+# * *
+# *****************************************************************************
+
+
+
+# $Id$
+#
+# $Log$
+#
+#
+
+
+# ------------------------------------------------------------------------------
+# Stuff you may want to edit
+
+# The name of the data file after installation. You may want to define
+# AREACODE_DATAFILE before calling make instead
+.if defined(AREACODE_DATAFILE)
+DATATARGET=$(AREACODE_DATAFILE)
+.else
+DATATARGET=/usr/lib/areacodes
+.endif
+
+# 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 ?= gcc295
+
+CFLAGS += -DFREEBSD -g -Wall
+
+# Name of the data file
+DATASOURCE=areacode.dat
+
+# ------------------------------------------------------------------------------
+# Implicit rules
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
+# ------------------------------------------------------------------------------
+#
+
+all: actest acvers
+
+actest: areacode.o actest.o
+ $(CC) -o actest areacode.o actest.o
+
+acvers: acvers.o
+ $(CC) -o acvers acvers.o
+
+areacode.o: areacode.h areacode.c
+ $(CC) $(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) -DFREEBSD -MM *.c > .depend
+
+# ------------------------------------------------------------------------------
+# clean up
+
+distclean: clean
+ -rm -f *.bak *~ .depend
+
+
+clean:
+ -rm -f *.o
+ -rm -f acvers actest
+
+zap: distclean
+
+
+
|