Subversion Repositories PlanixRsrch.SVN

Rev

Rev 450 | Rev 455 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
 
296 7u83 2
OBJS=\
3
     	mavl_create.o \
4
	mavl_del_all.o \
5
	mavlnode_destroy.o \
451 7u83 6
	mavlnode_get.o \
17 7u83 7
     	mavl_foreach.o \
19 7u83 8
	mavl_verify.o \
7 7u83 9
	mavl_get_depth.o \
22 7u83 10
	mavl_print.o \
7 7u83 11
	mavliter_init.o \
12
	mavliter_next.o \
13
	mavliter_get.o \
296 7u83 14
	mavliter_seek_set.o \
301 7u83 15
	mavl_del.o \
449 7u83 16
	mavl_destroy.o \
17
	mavl_get_ext.o \
451 7u83 18
	mavl.o mavl_get.o \
2 7u83 19
 
20
LIBNAME=libmavl.a
448 7u83 21
DLIBNAME=libmavl.so
2 7u83 22
 
67 7u83 23
PREFIX=~
24
 
448 7u83 25
all: $(LIBNAME) $(DLIBNAME)
26
static: $(LIBNAME) 
27
synamic: $(DLIBNAME)
28
 
2 7u83 29
.c.o: 
8 7u83 30
	$(CC) -c $(CFLAGS) $<
2 7u83 31
 
32
$(LIBNAME): $(OBJS)
33
	$(AR) rcs $(LIBNAME) $(OBJS)
34
 
448 7u83 35
$(DLIBNAME): $(OBJS)
36
	$(LD) $(LDFLAGS) -shared -o $(DLIBNAME) $(OBJS) 
37
 
7 7u83 38
example1: $(LIBNAME) example1.o
424 7u83 39
	$(CC) $(LDFLAGS) -o example1 example1.o $(LIBNAME)
2 7u83 40
 
17 7u83 41
example2: $(LIBNAME) example2.o
424 7u83 42
	$(CC) $(LDFLAGS) -o example2 example2.o $(LIBNAME)
2 7u83 43
 
450 7u83 44
example3: $(LIBNAME) example3.o
45
	$(CC) $(LDFLAGS) -o example3 example3.o $(LIBNAME)
46
 
308 7u83 47
mavtest: $(LIBNAME) mavtest.o
424 7u83 48
	$(CC) $(LDFLAGS) -o mavtest mavtest.o $(LIBNAME)
17 7u83 49
 
308 7u83 50
 
2 7u83 51
clean:
52
	rm -f $(OBJS)
53
	rm -f $(LIBNAME)
449 7u83 54
	rm -f $(DLIBNAME)
7 7u83 55
	rm -f example1.o example1 
17 7u83 56
	rm -f example2.o example2
450 7u83 57
	rm -f example3.o example3
308 7u83 58
	rm -f mavtest mavtest.o
7 7u83 59
	rm -f *.core
323 7u83 60
	rm -f test.o test
67 7u83 61
 
62
install: $(LIBNAME)
63
	mkdir -p $(PREFIX)/lib 	
64
	mkdir -p $(PREFIX)/include/libmavl
287 7u83 65
	install -p $(LIBNAME) $(PREFIX)/lib/$(LIBNAME) 
66
	install -p mavl.h $(PREFIX)/include/libmavl/mavl.h
67 7u83 67
 
322 7u83 68
test: $(LIBNAME) test.o
69
	$(CC) $(LDFLAGS) -o test  test.o $(LIBNAME) -lmutests
70