]> granicus.if.org Git - linux-pam/blob - modules/pam_ftp/Makefile
Relevant BUGIDs: 111648
[linux-pam] / modules / pam_ftp / Makefile
1 #
2 # $Id$
3 #
4 # This Makefile controls a build process of $(TITLE) module for
5 # Linux-PAM. You should not modify this Makefile (unless you know
6 # what you are doing!).
7 #
8 # Created by Andrew Morgan <morgan@linux.kernel.org> 1996/11/14
9 #
10
11 TITLE=pam_ftp
12
13 #
14
15 LIBSRC = $(TITLE).c
16 LIBOBJ = $(TITLE).o
17 LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
18 LIBOBJS = $(addprefix static/,$(LIBOBJ))
19
20 dynamic/%.o : %.c
21         $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
22
23 static/%.o : %.c
24         $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
25
26
27 ifdef DYNAMIC
28 LIBSHARED = $(TITLE).so
29 endif
30
31 ifdef STATIC
32 LIBSTATIC = lib$(TITLE).o
33 endif
34
35 ####################### don't edit below #######################
36
37 dummy:
38
39         @echo "**** This is not a top-level Makefile "
40         exit
41
42 all: dirs $(LIBSHARED) $(LIBSTATIC) register
43
44 dirs:
45 ifdef DYNAMIC
46         $(MKDIR) ./dynamic
47 endif
48 ifdef STATIC
49         $(MKDIR) ./static
50 endif
51
52 register:
53 ifdef STATIC
54         ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
55 endif
56
57 ifdef DYNAMIC
58 $(LIBOBJD): $(LIBSRC)
59
60 $(LIBSHARED):   $(LIBOBJD)
61         $(LD_D) -o $@ $(LIBOBJD)
62 endif
63
64 ifdef STATIC
65 $(LIBOBJS): $(LIBSRC)
66
67 $(LIBSTATIC): $(LIBOBJS)
68         $(LD) -r -o $@ $(LIBOBJS)
69 endif
70
71 install: all
72         $(MKDIR) $(FAKEROOT)$(SECUREDIR)
73 ifdef DYNAMIC
74         $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
75 endif
76
77 remove:
78         rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
79
80 clean:
81         rm -f $(LIBOBJD) $(LIBOBJS) core *~
82
83 extraclean: clean
84         rm -f *.a *.o *.so *.bak dynamic/* static/*
85
86 .c.o:   
87         $(CC) $(CFLAGS) -c $<
88