1 SIMGRID_INSTALL_DIR := ./simgrid-3.5-install
5 CHECK_FLAGS += -Wall -Wextra
10 CPPFLAGS += -I $(SIMGRID_INSTALL_DIR)/include
11 CPPFLAGS += $(CHECK_FLAGS)
14 CFLAGS += -fgnu89-inline # workaround simgrid bug
15 CFLAGS += $(OPTIM_FLAGS) $(DEBUG_FLAGS)
17 CXXFLAGS += $(OPTIM_FLAGS) $(DEBUG_FLAGS)
19 LDFLAGS += -L $(SIMGRID_INSTALL_DIR)/lib
20 LDFLAGS += -Wl,-rpath,$(SIMGRID_INSTALL_DIR)/lib
22 LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH)
25 MAKEDEPEND.C = $(CC) $(CPPFLAGS) -MM -MF $@ $<
26 MAKEDEPEND.CXX = $(CXX) $(CPPFLAGS) -MM -MF $@ $<
28 LOCALVERSION := localversion
29 SETLOCALVERSION := ./setlocalversion
31 SRC.loba := main.cpp \
37 SRC.simple_async := simple_async.cpp
39 SRC := $(SRC.loba) $(SRC.simple_async)
40 OBJ := $(SRC:%.cpp=%.o)
41 DEP := $(SRC:%.cpp=%.d)
43 TARGETS := loba simple_async
45 $(shell $(SETLOCALVERSION))
47 .PHONY: all depend clean
52 $(RM) core core.[0-9]* vgcore.[0-9]*
61 %.d: %.c ; $(MAKEDEPEND.C)
62 %.d: %.cpp ; $(MAKEDEPEND.CXX)
64 version.o: $(patsubst %.cpp,%.o,$(filter-out version.cpp, $(SRC.loba)))
69 $(TARGETS): $$(patsubst %.cpp,%.o,$$(SRC.$$@))
70 $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@