3 OLDINCLUDEDIR
= /usr
/include/tool
5 override CFLAGS
+= -lmallocab
-Wl
,-rpath
=$(LIBDIR
)
8 libarray.so
: libarray.c libarray.h
9 $(CC
) $(CFLAGS
) -o
$@
-shared libarray.c
11 $(LIBDIR
)/libarray.so
: libarray.so
12 install -m
0644 $(notdir $@
) $(LIBDIR
)/
13 @echo remove
$@
>> uninstall.sh
15 $(OLDINCLUDEDIR
)/libarray.h
: libarray.h |
$(OLDINCLUDEDIR
)
16 install -m
0644 $(notdir $@
) $(OLDINCLUDEDIR
)/
17 @echo remove
$@
>> uninstall.sh
20 [ -d
$(OLDINCLUDEDIR
) ] || mkdir
$(OLDINCLUDEDIR
)
21 @echo remove
$@
>> uninstall.sh
23 install: $(LIBDIR
)/libarray.so
$(OLDINCLUDEDIR
)/libarray.h
28 @
rm libarray.so t_libarray
31 t_libarray
: t_libarray.c
32 $(CC
) $(CFLAGS
) -o
$@ t_libarray.c