3 #### THIS FILE WAS GENERATED, DO NOT EDIT BEFORE RENAMING IT
7 ## Variable declarations
9 DISTDIR=gras-$(PROJECT_NAME)
11 # Set the GRAS_ROOT environment variable to the path under which you installed SimGrid
12 # Compilation will fail if you don't do so
13 GRAS_ROOT?= $(shell echo "\"<<<< GRAS_ROOT undefined !!! >>>>\"")
15 # You can fiddle the following to make it fit your taste
16 INCLUDES = -I$(GRAS_ROOT)/include
18 LIBS_SIM = -lm -L$(GRAS_ROOT)/lib/ -lsimgrid
19 LIBS_RL = -lm -L$(GRAS_ROOT)/lib/ -lgras
22 PRECIOUS_C_FILES ?= gras_prop.c
23 GENERATED_C_FILES = _gras_prop_simulator.c _gras_prop_client.c _gras_prop_server.c
24 OBJ_FILES = $(patsubst %.c,%.o,$(PRECIOUS_C_FILES))
25 BIN_FILES = gras_prop_simulator gras_prop_client gras_prop_server
27 ## By default, build all the binaries
31 ## generate temps: regenerate the source file each time the deployment file changes
32 _gras_prop_client.c _gras_prop_server.c _gras_prop_simulator.c: gras_prop_deployment.xml
33 gras_stub_generator gras_prop gras_prop_deployment.xml >/dev/null
35 ## Generate the binaries
36 gras_prop_simulator: _gras_prop_simulator.o $(OBJ_FILES)
37 $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS_SIM) $(LIBS) $(LDADD) -o $@
38 gras_prop_client : _gras_prop_client.o $(OBJ_FILES)
39 $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS_RL) $(LIBS) $(LDADD) -o $@
40 gras_prop_server : _gras_prop_server.o $(OBJ_FILES)
41 $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS_RL) $(LIBS) $(LDADD) -o $@
44 $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS) $(LDADD) -o $@
47 $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c -o $@ $<
49 ## Rules for tarballs and cleaning
50 DIST_FILES= $(EXTRA_DIST) $(GENERATED_C_FILES) $(PRECIOUS_C_FILES) gras_prop.mk
51 distdir: $(DIST_FILES)
57 tar c $(DISTDIR) | gzip -c9 > $(DISTDIR).tar.gz
60 rm -f $(CLEANFILES) $(BIN_FILES) $(OBJ_FILES) *~ gras_prop.o _gras_prop_simulator.o _gras_prop_client.o _gras_prop_server.o