Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
4f7c6fd8730d574a17f17260866586bed25d4e61
[simgrid.git] / examples / gras / properties / gras_prop.mk
1
2 ####
3 #### THIS FILE WAS GENERATED, DO NOT EDIT BEFORE RENAMING IT
4 ####
5
6
7 ## Variable declarations
8 PROJECT_NAME=gras_prop
9 DISTDIR=gras-$(PROJECT_NAME)
10
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 !!! >>>>\"")
14
15 # You can fiddle the following to make it fit your taste
16 INCLUDES = -I$(GRAS_ROOT)/include
17 CFLAGS ?= -O3 -w -g
18 LIBS_SIM = -lm  -L$(GRAS_ROOT)/lib/ -lsimgrid
19 LIBS_RL = -lm  -L$(GRAS_ROOT)/lib/ -lgras
20 LIBS = 
21
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 
26
27 ## By default, build all the binaries
28 all: $(BIN_FILES)
29
30
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
34
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 $@ 
42
43 %: %.o
44         $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS) $(LDADD) -o $@ 
45
46 %.o: %.c
47         $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c -o $@ $<
48
49 ## Rules for tarballs and cleaning
50 DIST_FILES= $(EXTRA_DIST) $(GENERATED_C_FILES) $(PRECIOUS_C_FILES) gras_prop.mk 
51 distdir: $(DIST_FILES)
52         rm -rf $(DISTDIR)
53         mkdir -p $(DISTDIR)
54         cp $^ $(DISTDIR)
55
56 dist: clean distdir
57         tar c $(DISTDIR) | gzip -c9 > $(DISTDIR).tar.gz
58
59 clean:
60         rm -f $(CLEANFILES) $(BIN_FILES) $(OBJ_FILES) *~ gras_prop.o _gras_prop_simulator.o _gras_prop_client.o _gras_prop_server.o
61         rm -rf $(DISTDIR)
62
63 .SUFFIXES:
64 .PHONY : clean
65