Statistics
| Branch: | Revision:

grapes / src / Makefile @ 4692000a

History | View | Annotate | Download (613 Bytes)

1
ifndef BASE
2
BASE = ..
3
endif
4
CFGDIR ?= .
5

    
6
SUBDIRS = ChunkIDSet ChunkTrading TopologyManager ChunkBuffer PeerSet Scheduler CloudSupport
7

    
8
COMMON_OBJS = config.o
9

    
10
.PHONY: subdirs $(SUBDIRS)
11

    
12
OBJ_LSTS = $(addsuffix /objs.lst, $(SUBDIRS))
13

    
14
all: libgrapes.a
15

    
16
$(OBJ_LSTS):
17
	$(MAKE) -C $(dir $@) objs.lst
18

    
19
libgrapes.a: $(OBJ_LSTS) $(COMMON_OBJS)
20
	$(AR) rcs libgrapes.a `cat $(OBJ_LSTS)` $(COMMON_OBJS)
21
	rm */*.lst
22

    
23
tests: libgrapes.a
24
	$(MAKE) -C Tests
25

    
26
clean::
27
	for dir in $(SUBDIRS); do \
28
		$(MAKE) -C $$dir clean; \
29
	done
30

    
31
allclean: clean
32
	rm -f *.o *.a
33
	rm -f *.d
34
	$(MAKE) -C Tests clean
35

    
36
include $(BASE)/src/utils.mak