File: Makefile

package info (click to toggle)
countrycodes 1.0.3-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 140 kB
  • ctags: 47
  • sloc: ansic: 582; makefile: 89; sh: 12
file content (96 lines) | stat: -rw-r--r-- 2,304 bytes parent folder | download | duplicates (2)
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
#
# Country Codes Makefile
#

#
# Modify this, if you need to and if you know what you are doing.
#

# Edited for Debian GNU/Linux.
DESTDIR =

srcdir = .

prefix = $(DESTDIR)/usr
bindir = ${prefix}/bin
docdir = ./doc

# For system that doesn't support mkdir -p.
# If you have Linux, don't bother.

MKDIRECTORY = mkdir -p

# Mode for user binaries
BINMODE=700

# Mode for the log directory
LOGDIRMODE=700

# Compiler to use
CC=gcc

# Compiler warnings
WARNINGS= -pedantic -Wall

# Compiler flags
CCOPTS = -O2 -fomit-frame-pointer

# The makefile standards document I read says that I have to put it here...
SHELL = /bin/sh

# Clear and set suffixes 
.SUFFIXES:
.SUFFIXES: .c .o

# Install program
INSTALL = install

# Miscellaneous
COCO_VERSION = 1.0.3
RELEASEDATE  = July 2000

# Location of sed
SEDBIN  = sed

# sed command
SEDCMDS = "s/@version@/$(COCO_VERSION)/g;s/@releasedate@/$(RELEASEDATE)/g"

ISO3166OBJ = iso3166.o common.o

PROGRAM = iso3166

all: $(PROGRAM)

$(PROGRAM): $(ISO3166OBJ)
	$(CC) $(CCOPTS) $(ISO3166OBJ) -o $@

clean:
	rm -f $(ISO3166OBJ) core defines.h $(PROGRAM)

strip:
	strip $(PROGRAM)

install:
	$(INSTALL) -g root -m $(BINMODE) -o root -s ${srcdir}/$(PROGRAM) ${bindir}	

uninstall:
	rm -f ${bindir}/$(PROGRAM)

.c.o:
	$(CC) $(CCOPTS) $(WARNINGS) -c $<

$(ISO3166OBJ): common.h defines.h

defines.h:
	@echo "Creating file \"defines.h\""
	@echo "/*"                                                           >> $(srcdir)/defines.h
	@echo "   Global #defines for Country Codes"                         >> $(srcdir)/defines.h
	@echo "   Copyright (C) 1999, 2000 Diego Javier Grigna <diego@grigna.com>" >> $(srcdir)/defines.h
	@echo ""                                                             >> $(srcdir)/defines.h
	@echo "   File automatically created by the Makefile."               >> $(srcdir)/defines.h
	@echo "   Do not edit by hand, modify the Makefile instead."         >> $(srcdir)/defines.h
	@echo "*/"                                                           >> $(srcdir)/defines.h
	@echo ""                                                             >> $(srcdir)/defines.h
	@echo "#define COCO_VERSION    \"$(COCO_VERSION)\""                  >> $(srcdir)/defines.h
	@echo ""                                                             >> $(srcdir)/defines.h