]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Makefile
Remember to close directories when we are finished with them.
[thirdparty/mdadm.git] / Makefile
index 47654b9bb099e046f1d55e27d55c09dad5d5452f..68b3891870fe601c4ed283f420e85852fdd3a2b9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,12 +70,17 @@ OBJS =  mdadm.o config.o mdstat.o  ReadMe.o util.o Manage.o Assemble.o Build.o \
        Create.o Detail.o Examine.o Grow.o Monitor.o dlink.o Kill.o Query.o \
        Incremental.o \
        mdopen.o super0.o super1.o super-ddf.o super-intel.o bitmap.o \
-       restripe.o sysfs.o sha1.o mapfile.o crc32.o sg_io.o
+       restripe.o sysfs.o sha1.o mapfile.o crc32.o sg_io.o msg.o
 SRCS =  mdadm.c config.c mdstat.c  ReadMe.c util.c Manage.c Assemble.c Build.c \
        Create.c Detail.c Examine.c Grow.c Monitor.c dlink.c Kill.c Query.c \
        Incremental.c \
        mdopen.c super0.c super1.c super-ddf.c super-intel.c bitmap.c \
-       restripe.c sysfs.c sha1.c mapfile.c crc32.c sg_io.c
+       restripe.c sysfs.c sha1.c mapfile.c crc32.c sg_io.c msg.c
+
+MON_OBJS = mdmon.o monitor.o managemon.o util.o mdstat.o sysfs.o config.o \
+       Kill.o sg_io.o dlink.o ReadMe.o super0.o super1.o super-intel.o \
+       super-ddf.o sha1.o crc32.o msg.o
+
 
 STATICSRC = pwgr.c
 STATICOBJS = pwgr.o
@@ -88,7 +93,7 @@ ASSEMBLE_SRCS += mdopen.c mdstat.c
 ASSEMBLE_FLAGS += -DMDASSEMBLE_AUTO
 endif
 
-all : mdadm mdadm.man md.man mdadm.conf.man
+all : mdadm mdmon mdadm.man md.man mdadm.conf.man
 
 everything: all mdadm.static swap_super test_stripe \
        mdassemble mdassemble.static mdassemble.man \
@@ -118,6 +123,10 @@ mdadm.Os : $(SRCS) mdadm.h
 mdadm.O2 : $(SRCS) mdadm.h
        gcc -o mdadm.O2 $(CFLAGS)  -DHAVE_STDINT_H -O2 $(SRCS)
 
+mdmon : $(MON_OBJS)
+       $(CC) $(LDFLAGS) -o mdmon $(MON_OBJS) $(LDLIBS)
+msg.o: msg.c msg.h
+
 test_stripe : restripe.c mdadm.h
        $(CC) $(CXFLAGS) $(LDFLAGS) -o test_stripe -DMAIN restripe.c
 
@@ -182,7 +191,8 @@ test: mdadm test_stripe swap_super
        @echo "Please run 'sh ./test' as root"
 
 clean : 
-       rm -f mdadm $(OBJS) $(STATICOBJS) core *.man mdadm.tcc mdadm.uclibc mdadm.static *.orig *.porig *.rej *.alt \
+       rm -f mdadm mdmon $(OBJS) $(MON_OBJS) $(STATICOBJS) core *.man \
+       mdadm.tcc mdadm.uclibc mdadm.static *.orig *.porig *.rej *.alt \
        mdadm.Os mdadm.O2 \
        mdassemble mdassemble.static mdassemble.uclibc mdassemble.klibc swap_super \
        init.cpio.gz mdadm.uclibc.static test_stripe