Statistics
| Branch: | Revision:

grapes / src / Makefile @ 8e0afb75

History | View | Annotate | Download (642 Bytes)

1 d97b1942 Luca Abeni
ifndef BASE
2 43e498bb Luca Abeni
BASE = ..
3 d97b1942 Luca Abeni
endif
4
CFGDIR ?= .
5
6 94729cc8 Luca Abeni
SUBDIRS = ChunkIDSet ChunkTrading TopologyManager ChunkBuffer PeerSet Scheduler Cache PeerSampler Chunkiser
7 928618ee luca
COMMON_OBJS = config.o
8
9 7d421984 Luca Abeni
.PHONY: subdirs $(SUBDIRS)
10 928618ee luca
11 c5947928 Luca Abeni
OBJ_LSTS = $(addsuffix /objs.lst, $(SUBDIRS))
12 5a04fb17 Luca Abeni
13 33c88ad7 Luca Abeni
all: libgrapes.a
14
15 38deeb45 Luca Abeni
$(OBJ_LSTS):
16 1e8dedd8 Luca Abeni
	$(MAKE) -C $(dir $@) objs.lst FFDIR=$(FFDIR)
17 928618ee luca
18 38deeb45 Luca Abeni
libgrapes.a: $(OBJ_LSTS) $(COMMON_OBJS)
19 9d684cae Luca Abeni
	$(AR) rcs libgrapes.a `cat $(OBJ_LSTS)` $(COMMON_OBJS)
20 c5947928 Luca Abeni
	rm */*.lst
21 7d421984 Luca Abeni
22 f9d6272b Luca Abeni
tests: libgrapes.a
23
	$(MAKE) -C Tests
24
25 43e498bb Luca Abeni
clean::
26 7d421984 Luca Abeni
	for dir in $(SUBDIRS); do \
27
		$(MAKE) -C $$dir clean; \
28
	done
29
30
allclean: clean
31 f9d6272b Luca Abeni
	rm -f *.o *.a
32 4876398c Luca Abeni
	rm -f *.d
33 2e82f6db Luca Abeni
	$(MAKE) -C Tests clean
34 43e498bb Luca Abeni
35 c7e57971 Luca Abeni
include $(BASE)/src/utils.mak