Whamcloud - gitweb
Makefile.in: Revamp makefile so that it doesn't depend
[tools/e2fsprogs.git] / lib / evms / Makefile.in
1 srcdir = @srcdir@
2 top_srcdir = @top_srcdir@
3 VPATH = @srcdir@
4 top_builddir = ../..
5 my_dir = lib/evms
6 INSTALL = @INSTALL@
7
8 MAJOR_VERSION   = 1
9 MINOR_VERSION   = 1
10 PATCH_LEVEL     = 1
11 EXTRAVERSION    =
12
13 XTRA_CFLAGS= -I@srcdir@ -DMAJOR_VERSION=$(MAJOR_VERSION) -DMINOR_VERSION=$(MINOR_VERSION) -DPATCH_LEVEL=$(PATCH_LEVEL)
14
15 @MCONFIG@
16
17 OBJS= fs_ext2.o fsimext2.o
18
19 SRCS= $(srcdir)/fs_ext2.c $(srcdir)/fsimext2.c
20
21
22 LIBRARY= libext2fsim
23 LIBDIR= evms
24
25 ELF_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
26 ELF_SO_VERSION = $(MAJOR_VERSION)
27 ELF_IMAGE = libe2fsim
28 ELF_MYDIR = evms
29 ELF_INSTALL_DIR = $(root_libdir)/evms
30 #ELF_OTHER_LIBS = -L../.. -lcom_err
31
32 ELF_LIB = $(ELF_IMAGE).$(ELF_VERSION).so
33 ELF_SONAME = $(ELF_IMAGE).$(ELF_SO_VERSION).so
34
35 all:: $(ELF_LIB)
36
37 $(ELF_LIB): $(OBJS)
38         $(CC) --shared -o $(ELF_LIB) -Wl,-soname,$(ELF_SONAME) \
39                 $(OBJS) $(ELF_OTHER_LIBS)
40
41 installdirs:: 
42         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ELF_INSTALL_DIR) 
43
44 install:: $(ELF_LIB) installdirs
45         $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
46         $(STRIP) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
47
48 uninstall-shlibs uninstall::
49         $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) 
50
51 clean::
52         $(RM) -f $(ELF_LIB)
53         $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
54
55 .c.o:
56         $(CC) $(ALL_CFLAGS) -fPIC -c $< -o $@
57
58 clean::
59         $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/* 
60
61 mostlyclean:: clean
62 distclean:: clean
63         $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
64
65 # +++ Dependency line eater +++
66
67 # Makefile dependencies follow.  This must be the last section in
68 # the Makefile.in file
69 #
70 fs_ext2.o: $(srcdir)/fs_ext2.c $(srcdir)/plugin.h $(srcdir)/dlist.h \
71  $(srcdir)/common.h $(srcdir)/options.h $(srcdir)/enginestructs.h \
72  $(srcdir)/plugfuncs.h $(srcdir)/fsimext2.h
73 fsimext2.o: $(srcdir)/fsimext2.c $(srcdir)/plugin.h $(srcdir)/dlist.h \
74  $(srcdir)/common.h $(srcdir)/options.h $(srcdir)/enginestructs.h \
75  $(srcdir)/plugfuncs.h $(srcdir)/fsimext2.h