Statistics
| Branch: | Revision:

grapes / src / Makefile @ 5033613a

History | View | Annotate | Download (599 Bytes)

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

    
6
SUBDIRS = ChunkIDSet ChunkTrading TopologyManager ChunkBuffer PeerSet Scheduler
7
COMMON_OBJS = config.o
8

    
9
.PHONY: subdirs $(SUBDIRS)
10

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

    
13
all: libgrapes.a
14

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

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

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

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

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

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