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.FLAGS = $(CPPFLAGS) -MM -MF $@ $<
26 MAKEDEPEND.C = $(CC) $(MAKEDEPEND.FLAGS)
27 MAKEDEPEND.CXX = $(CXX) $(MAKEDEPEND.FLAGS)
29 LOCALVERSION := localversion
30 SETLOCALVERSION := ./setlocalversion
32 SRC.loba := main.cpp \
39 SRC.simple_async := simple_async.cpp
41 SRC := $(SRC.loba) $(SRC.simple_async)
42 OBJ := $(SRC:%.cpp=%.o)
43 DEP := $(SRC:%.cpp=%.d)
45 TARGETS := loba simple_async
47 $(shell $(SETLOCALVERSION))
49 .PHONY: all depend clean
54 $(RM) core core.[0-9]* vgcore.[0-9]*
63 %.d: %.c ; $(MAKEDEPEND.C)
64 %.d: %.cpp ; $(MAKEDEPEND.CXX)
66 version.o: $(patsubst %.cpp,%.o,$(filter-out version.cpp, $(SRC.loba)))
71 $(TARGETS): $$(patsubst %.cpp,%.o,$$(SRC.$$@))
72 $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@