Statistics
| Branch: | Tag: | Revision:

sssimulator / Makefile @ 743e659d

History | View | Annotate | Download (1.09 KB)

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/ -I lpsolve
9
LDLIBS = -lm -ldl
10

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

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

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

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

    
28
all: sssim proc-time
29

    
30
sssim: $(OBJS) EventScheduler/libeventscheduler.a Matrix/libmatrix.a lpsolve/lpsolve55/liblpsolve55.a
31

    
32
lpsolve/lpsolve55/liblpsolve55.a:
33
	git submodule init
34
	git submodule update
35
	cd lpsolve/lpsolve55
36
	$(sh ccc)
37

    
38
EventScheduler/libeventscheduler.a:
39
	$(MAKE) -C EventScheduler/
40

    
41
Matrix/libmatrix.a:
42
	$(MAKE) -C Matrix
43

    
44
proc-time: proc-time.c
45

    
46
clean:
47
	rm -f $(OBJS) $(OBJS:.o=.d) sssim
48
	$(MAKE) -C Matrix clean
49
	$(MAKE) -C Test clean
50
	$(MAKE) -C EventScheduler/ clean
51

    
52
sched.o: Makefile
53
sssim.o: Makefile
54
#####################################
55
%.d: %.c
56
	$(CC) -MM -MF $@ $<
57

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