File: Makefile

package info (click to toggle)
prips 0.9.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 140 kB
  • ctags: 42
  • sloc: ansic: 383; makefile: 44
file content (64 lines) | stat: -rw-r--r-- 2,189 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
# Copyright (C) 2001-2003  Daniel Kelly
# Copyright (C) 2009, 2010  Peter Pentchev
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

CFLAGS_OPT?=	-O2
CFLAGS_DBG?=	-g
CFLAGS_WARN?=	-Wall -W -ansi -pedantic -Wbad-function-cast -Wcast-align \
		-Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes \
		-Wnested-externs -Wpointer-arith -Wshadow \
		-Wstrict-prototypes -Wwrite-strings \
		-Wsystem-headers -Wno-format-y2k -Winline -Wno-pointer-sign \
		-Wreturn-type -Wswitch -Wunused-parameter

CFLAGS?=	${CFLAGS_OPT} ${CFLAGS_DBG}
CFLAGS+=	${CFLAGS_WARN}

CC?=gcc
LIBS?=
RM?=rm -f
GZIP?=		gzip -c9
FALSE?=		false

# Keep this uncommented if you are building prips on a POSIX-compatible
# system.  If you are not sure, chances are that you most probably are.
CFLAGS+=	-DHAVE_POSIX
# Keep this uncommented if your header files provide a definition for
# the POSIX-compatible 32-bit unsigned integer type
CFLAGS+=	-DHAVE_UINT32_T
# If you do NOT have the POSIX-compatible uint32_t type, please specify
# which of the integer types on your platform is 32-bits wide
#CFLAGS+=	-DINT32_T=int

all: prips prips.1.gz

prips: main.o prips.o except.o
	$(CC) $(LDFLAGS) -o prips main.o prips.o except.o $(LIBS)

main.o: main.c prips.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c main.c

prips.o: prips.c prips.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -c prips.c 

except.o: except.c except.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -c except.c

prips.1.gz:	prips.1
	${GZIP} prips.1 > prips.1.gz || (${RM} prips.1.gz; ${FALSE})

clean:	
	$(RM) core *~ *.o prips prips.1.gz