]> granicus.if.org Git - linux-pam/blob - modules/pammodutil/Makefile
Relevant BUGIDs: 490938
[linux-pam] / modules / pammodutil / Makefile
1 #
2 # $Id$
3 #
4 #
5
6 include ../../Make.Rules
7
8 LIBNAME=libpammodutil
9
10 # ---------------------------------------------
11
12 dummy: all
13
14 # ---------------------------------------------
15
16 CFLAGS += $(PIC) $(STATIC) $(MOREFLAGS) \
17   -DLIBPAM_VERSION_MAJOR=$(MAJOR_REL) \
18   -DLIBPAM_VERSION_MINOR=$(MINOR_REL)
19
20 # all the object files we care about
21 LIBOBJECTS = modutil_cleanup.o modutil_getpwnam.o modutil_getpwuid.o
22
23 # static library name
24 LIBSTATIC = $(LIBNAME).a
25
26 SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS) $(STATICOBJ))
27
28 # ---------------------------------------------
29 ## rules
30
31 all: dirs $(LIBSTATIC) ../../Make.Rules
32
33 dirs:
34         $(MKDIR) static
35
36 static/%.o : %.c
37         $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
38
39 $(LIBSTATIC): $(SLIBOBJECTS)
40         ar cr $@ $(SLIBOBJECTS)
41         $(RANLIB) $@
42
43 install:
44         @echo "at this time, we're not installing $(LIBSTATIC)"
45
46 remove:
47         @echo "at this time, there is nothing to remove"
48
49 clean:
50         rm -f a.out core *~ static/*.o
51         rm -f *.a *.o
52         if [ -d dynamic ]; then rmdir dynamic ; fi
53         if [ -d static ]; then rmdir static ; fi