blob: dbd6452ab28515c2387683037d914f8c240ca957 (
plain)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
#
# $Id: Makefile,v 1.10 1997/04/05 06:41:09 morgan Exp $
#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
# $Log: Makefile,v $
# Revision 1.10 1997/04/05 06:41:09 morgan
# fakeroot
#
# Revision 1.9 1997/02/15 18:58:48 morgan
# fixed bash syntax
#
# Revision 1.8 1997/01/04 20:24:29 morgan
# don't compile on solaris, make -> $(MAKE)
#
# Revision 1.7 1996/11/10 20:12:09 morgan
# cross platform support
#
# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
#
ifeq ($(OS),solaris)
include ../dont_makefile
else
TITLE=pam_filter
FILTERS=upperLOWER
FILTERSDIR=$(SUPLEMENTED)/pam_filter
export FILTERSDIR
#
LIBSRC = $(TITLE).c
LIBOBJ = $(TITLE).o
LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
LIBOBJS = $(addprefix static/,$(LIBOBJ))
dynamic/%.o : %.c
$(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
static/%.o : %.c
$(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
ifdef DYNAMIC
LIBSHARED = $(TITLE).so
endif
ifdef STATIC
LIBSTATIC = lib$(TITLE).o
endif
####################### don't edit below #######################
dummy:
@echo "**** This is not a top-level Makefile "
exit
#
# this is where we compile this module
#
all: dirs $(LIBSHARED) $(LIBSTATIC) register filters
dirs:
ifdef DYNAMIC
$(MKDIR) ./dynamic
endif
ifdef STATIC
$(MKDIR) ./static
endif
register:
ifdef STATIC
( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
endif
filters:
@for i in $(FILTERS) ; do \
if [ -d $$i ]; then \
$(MAKE) -C $$i all ; \
fi ; \
done
ifdef DYNAMIC
$(LIBOBJD): $(LIBSRC)
endif
ifdef DYNAMIC
$(LIBSHARED): $(LIBOBJD)
$(LD_D) -o $@ $(LIBOBJD)
endif
ifdef STATIC
$(LIBOBJS): $(LIBSRC)
endif
ifdef STATIC
$(LIBSTATIC): $(LIBOBJS)
$(LD) -r -o $@ $(LIBOBJS)
endif
install: all
@for i in $(FILTERS) ; do \
if [ -d $$i ]; then \
$(MAKE) -C $$i install ; \
fi ; \
done
$(MKDIR) $(FAKEROOT)$(SECUREDIR)
ifdef DYNAMIC
$(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
endif
$(MKDIR) $(FAKEROOT)$(INCLUDED)
$(INSTALL) -m 644 include/pam_filter.h $(FAKEROOT)$(INCLUDED)
remove:
rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
rm -f $(FAKEROOT)$(INCLUDED)/pam_filter.h
@for i in $(FILTERS) ; do \
if [ -d $$i ]; then \
$(MAKE) -C $$i remove ; \
fi ; \
done
lclean:
rm -f $(LIBSHARED) $(LIBOBJD) $(LIBOBJS) core *~
clean: lclean
@for i in $(FILTERS) ; do \
if [ -d $$i ]; then \
$(MAKE) -C $$i clean ; \
fi ; \
done
extraclean: lclean
@rm -f *.a *.o *.so *.bak
for i in $(FILTERS) ; do \
if [ -d $$i ]; then \
$(MAKE) -C $$i extraclean ; \
fi ; \
done
.c.o:
$(CC) $(CFLAGS) -c $<
endif
|