]> git.ipfire.org Git - thirdparty/util-linux.git/blame - getopt-1.1.0a/Makefile
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / getopt-1.1.0a / Makefile
CommitLineData
5c36a0eb
KZ
1.SUFFIXES:
2
7eda085c 3include ../make_include
5c36a0eb
KZ
4include ../MCONFIG
5
66ee8158 6GETOPTDIR=$(USRSHAREMISCDIR)/getopt
5c36a0eb
KZ
7
8# Define this to 0 to use the getopt(3) routines in this package.
9LIBCGETOPT=1
10
11SHELL=/bin/sh
12
13LD=ld
14RM=rm -f
15INSTALL=install
16
17CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT)
18ifeq ($(LIBCGETOPT),0)
19CPPFLAGS+=-I./gnu
20endif
21
22# -Wcast-align causes problems with the identifier stderr on alpha's
23# with an old glibc.
24# -Wbad-function-cast and -Wmissing-declarations are unknown for gcc 2.5.8.
25WARNINGS=-Wall \
26 -W -Wshadow -Wpointer-arith -Wcast-qual \
27 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
28 -Wnested-externs -Winline
66ee8158 29# CFLAGS= $(WARNINGS) $(OPT)
5c36a0eb
KZ
30
31SOURCES=getopt.c
32ifeq ($(LIBCGETOPT),0)
33SOURCES+=gnu/getopt.c gnu/getopt1.c
34endif
35
36OBJECTS=$(SOURCES:.c=.o)
37
38BINARIES=getopt
39
40.PHONY: all clean realclean
41all: $(BINARIES)
42
43clean:
44 -$(RM) $(OBJECTS) $(BINARIES)
45
46getopt: $(OBJECTS)
47 $(CC) $(LDFLAGS) $< -o $@
48
49install: getopt
50 $(INSTALLDIR) $(USRBINDIR) $(MAN1DIR) $(GETOPTDIR)
51 $(INSTALLBIN) getopt $(USRBINDIR)
52 $(INSTALLMAN) getopt.1 $(MAN1DIR)
53 $(INSTALLBIN) parse.bash parse.tcsh test.bash test.tcsh $(GETOPTDIR)