Blame view

Multi_Makefiles/Makefile 644 Bytes
0ae69087   pfrison   Ajout des fichiers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  #
  # Variables d'environnement
  #
  export CC = gcc
  export LD = gcc
  export CLIB = ar cq
  export CFLAGS = -Wall -Wextra -pedantic
  
  #
  # Constantes liees au projet
  #
  
  DIRS = Threads Network Sioux Tangible
  
  #
  # La cible generale
  #
  
  all: $(patsubst %, _dir_%, $(DIRS))
  
  $(patsubst %,_dir_%,$(DIRS)):
  	cd $(patsubst _dir_%,%,$@) && make
  
  #
  # La cible de debug
  #
  
  debug: CFLAGS += -g -DDEBUG
  debug: $(patsubst %, _debug_%, $(DIRS))
  
  $(patsubst %,_debug_%,$(DIRS)):
  	cd $(patsubst _debug_%,%,$@) && make debug
  
  #
  # La cible de nettoyage
  #
  
  clean: $(patsubst %, _clean_%, $(DIRS))
  
  $(patsubst %,_clean_%,$(DIRS)):
  	cd $(patsubst _clean_%,%,$@) && make clean