1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
PREFIX=/usr
INCDIR=$(install_root)$(DESTDIR)$(PREFIX)/include/genlist
LIBDIR=$(install_root)$(DESTDIR)$(PREFIX)/lib
CFLAGS = -I. -I.. $(GENLIST_CFLAGS)
LDFLAGS = $(GENLIST_LDFLAGS)
#CFLAGS += -Wall -g -I. -I..
OBJS = genlistalloc.o genadlist.o
LIBA = libgenlist.a
all: $(LIBA) genlist.a
$(LIBA): $(OBJS)
ar r $(LIBA) $(OBJS)
-ar s $(LIBA)
-ranlib $(LIBA)
# obsolete: DO NOT DEPEND ON THIS
genlist.a: $(LIBA)
cp $(LIBA) genlist.a
example_ad: example_ad.o $(OBJS)
example_d: example_d.c gendlist.h
clean:
rm $(OBJS) $(LIBA) genlist.a example_ad example_d; true
install_:
mkdir -p $(INCDIR) $(LIBDIR)
$(CP) `pwd`/genadlist.h $(INCDIR)/genadlist.h
$(CP) `pwd`/gendlist.h $(INCDIR)/gendlist.h
$(CP) `pwd`/genlistalloc.h $(INCDIR)/genlistalloc.h
$(CP) `pwd`/gentdlist_impl.h $(INCDIR)/gentdlist_impl.h
$(CP) `pwd`/gentdlist_impl.c $(INCDIR)/gentdlist_impl.c
$(CP) `pwd`/gentdlist_undef.h $(INCDIR)/gentdlist_undef.h
$(CP) `pwd`/$(LIBA) $(LIBDIR)/$(LIBA)
uninstall:
rm $(INCDIR)/$(INCDIR)/genadlist.h
rm $(INCDIR)/$(INCDIR)/gendlist.h
rm $(INCDIR)/$(INCDIR)/genlistalloc.h
rm $(INCDIR)/$(INCDIR)/gentdlist_impl.h
rm $(INCDIR)/$(INCDIR)/gentdlist_undef.h
rm $(LIBDIR)/$(LIBA)
install:
make install_ CP="cp"
linstall:
make install_ CP="ln -s"
|