Statistics
| Branch: | Tag: | Revision:

sssimulator / Makefile @ f1158e5c

History | View | Annotate | Download (1019 Bytes)

1
PEER_SCHED ?= ch_earliest_free_peer
2
CHUNK_SCHED ?= dl_sched
3

    
4
CFLAGS += -std=c99 -Wall
5
ifndef DBG
6
CFLAGS += -O8
7
endif
8
CFLAGS += -g -I EventScheduler/ -I Matrix/
9
LIBS += EventScheduler/libeventscheduler.a Matrix/libmatrix.a 
10
LDLIBS += -lm  
11

    
12
CPPFLAGS += -Dpeer_send=peer_send_c_p
13
CPPFLAGS += -Dpeer_sched=$(PEER_SCHED)
14
CPPFLAGS += -Dchunk_sched=$(CHUNK_SCHED)
15

    
16
ifdef SRC
17
CPPFLAGS += -I$(SRC)
18
VPATH = $(SRC)
19
endif
20

    
21
ifdef NO_BUFF
22
CPPFLAGS += -DNO_BUFFER
23
endif
24

    
25
OBJS = sssim.o sched.o graph.o stats.o
26
OBJS += td.o peer_event.o ed.o overlay.o
27

    
28
all: sssim proc-time
29

    
30
sssim: $(LIBS) $(OBJS) 
31
	$(CC) -o sssim $(CFLAGS) $(OBJS) $(LIBS) $(LDLIBS)
32

    
33
EventScheduler/libeventscheduler.a:
34
	$(MAKE) -C EventScheduler/
35

    
36
Matrix/libmatrix.a:
37
	$(MAKE) -C Matrix
38

    
39
proc-time: proc-time.c
40

    
41
clean:
42
	rm -f $(OBJS) $(OBJS:.o=.d) sssim
43
	$(MAKE) -C Matrix clean
44
	$(MAKE) -C Test clean
45
	$(MAKE) -C EventScheduler/ clean
46

    
47
sched.o: Makefile
48
sssim.o: Makefile
49
#####################################
50
%.d: %.c
51
	$(CC) -MM -MF $@ $<
52

    
53
-include $(OBJS:.o=.d)