Makefile.in 3.31 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
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
# Makefile for regex.
# 
# Copyright (C) 1992 Free Software Foundation, Inc.
#
# 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA.

version = 0.11

# You can define CPPFLAGS on the command line.  Aside from system-specific
# flags, you can define:
#   -DREGEX_MALLOC to use malloc/realloc/free instead of alloca.
#   -DDEBUG to enable the compiled pattern disassembler and execution
#           tracing; code runs substantially slower.
#   -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
#           the corresponding C procedures).  If not -DDEBUG, the macros
#           are used.
CPPFLAGS = 

# Likewise, you can override CFLAGS to optimize, use -Wall, etc.
CFLAGS = -g

# Ditto for LDFLAGS and LOADLIBES.
LDFLAGS =
LOADLIBES =

srcdir = @srcdir@
VPATH = @srcdir@

CC = @CC@
DEFS = @DEFS@

SHELL = /bin/sh

46
47
48
49
50
51
# Special support for LysKOM
include Topdir.make
SCRIPTDIR = $(TOPDIR)/scripts

include $(SCRIPTDIR)/import.make

Per Cederqvist's avatar
Per Cederqvist committed
52
53
54
55
56
subdirs = doc test

default all:: regex.o
.PHONY: default all

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
LIBNAME = libregex$(PROFILE-LIB-SUFFIX).a
LIBOBJS = regex.o
INSTALL-HDRS = regex.h

$(LIBNAME): $(LIBOBJS)
	$(AR) $(ARFLAGS) $(LIBNAME) $?
	$(RANLIB) $(LIBNAME)

libraries: $(LIBNAME)
	$(RM) $(LIBDIR)/$(LIBNAME)
	cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
	$(TOUCHLIB) $(LIBDIR)/$(LIBNAME)

include $(SCRIPTDIR)/install-includes.make

binaries:;

Per Cederqvist's avatar
Per Cederqvist committed
74
75
76
77
regex.o: regex.c regex.h
	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<

clean mostlyclean::
78
	$(RM) ${OBJECTS} $(GENERIC-CLEAN)
Per Cederqvist's avatar
Per Cederqvist committed
79
80
81

distclean:: clean
	rm -f Makefile config.status
82
	$(RM) $(GENERIC-DIST-CLEAN)
Per Cederqvist's avatar
Per Cederqvist committed
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
119
120
121
122
123
124
125

realclean:: distclean
	rm -f configure

extraclean:: distclean
	rm -f patch* *~* *\#* *.orig *.rej *.bak core a.out

configure: configure.in
	autoconf

config.status: configure
	configure

Makefile: Makefile.in config.status
	sh config.status

makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'

default all install \
mostlyclean clean distclean extraclean realclean \
TAGS check::
	for d in $(subdirs); do (cd $$d; $(MAKE) $(makeargs) $@); done
.PHONY: install mostlyclean clean distclean extraclean realclean TAGS check

# Prevent GNU make 3 from overflowing arg limit on system V.
.NOEXPORT:

distfiles = AUTHORS ChangeLog COPYING NEWS README \
            *.in configure regex.c regex.h 
distdir = regex-$(version)
distargs = version=$(version) distdir=../$(distdir)/$$d
dist: TAGS configure
	@echo "Version numbers in: Makefile.in, ChangeLog, NEWS,"
	@echo "  regex.c, regex.h,"
	@echo "  and doc/xregex.texi (if modified)."
	rm -rf $(distdir)
	mkdir $(distdir)
	ln $(distfiles) $(distdir)
	for d in $(subdirs); do (cd $$d; $(MAKE) $(distargs) dist); done
	tar czhf $(distdir).tar.Z $(distdir)
	rm -rf $(distdir)
.PHONY: dist