Bonjour,
J'ai développé un code depuis qqs temps, tous les *.hh et *.cc de ce code sont dans un même répertoire.
Mon makefile est le suivant:
Maintenant je souhaite diviser mon code en modules c'est à dire créer un répertoire pour chaque module et mettre dans ce répertoire les fichiers *.hh et *.cc du module.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62 CCFLAGS := -I/usr/local/cenaero/freeware/boost/current/no-arch/ main: main.o struc.o longeron.o association.o transformation.o postprocessing.o solver.o globale.o pli.o unidirectionnel.o echantillon.o laminate.o value.o composites_automation.o object_factory.o axisChange.o joint.o problem.o group.o contact.o ply.o tissue.o laminate2.o function.o seer_dfm.o opt_variables.o g++ -o main main.o struc.o longeron.o association.o transformation.o postprocessing.o solver.o globale.o pli.o unidirectionnel.o echantillon.o laminate.o value.o composites_automation.o object_factory.o axisChange.o joint.o group.o problem.o contact.o ply.o tissue.o laminate2.o function.o seer_dfm.o opt_variables.o main.o: main.cc g++ ${CCFLAGS} -c main.cc -g struc.o: struc.cc g++ ${CCFLAGS} -c struc.cc -g longeron.o: longeron.cc g++ ${CCFLAGS} -c longeron.cc -g association.o: association.cc g++ ${CCFLAGS} -c association.cc -g transformation.o: transformation.cc g++ ${CCFLAGS} -c transformation.cc -g postprocessing.o: postprocessing.cc g++ ${CCFLAGS} -c postprocessing.cc -g solver.o: solver.cc g++ ${CCFLAGS} -c solver.cc -g globale.o: globale.cc g++ ${CCFLAGS} -c globale.cc -g pli.o: pli.cc g++ ${CCFLAGS} -c pli.cc -g unidirectionnel.o: unidirectionnel.cc g++ ${CCFLAGS} -c unidirectionnel.cc -g echantillon.o: echantillon.cc g++ ${CCFLAGS} -c echantillon.cc -g function.o: function.cc g++ ${CCFLAGS} -c function.cc -g laminate.o: laminate.cc g++ ${CCFLAGS} -c laminate.cc -g value.o: value.cc g++ ${CCFLAGS} -c value.cc -g opt_variables.o: opt_variables.cc g++ ${CCFLAGS} -c opt_variables.cc -g composites_automation.o: composites_automation.cc g++ ${CCFLAGS} -c composites_automation.cc -g object_factory.o: object_factory.cc g++ ${CCFLAGS} -c object_factory.cc -g axisChange.o: axisChange.cc g++ ${CCFLAGS} -c axisChange.cc -g joint.o: joint.cc g++ ${CCFLAGS} -c joint.cc -g problem.o: problem.cc g++ ${CCFLAGS} -c problem.cc -g group.o: group.cc g++ ${CCFLAGS} -c group.cc -g contact.o: contact.cc g++ ${CCFLAGS} -c contact.cc -g ply.o: ply.cc g++ ${CCFLAGS} -c ply.cc -g tissue.o: tissue.cc g++ ${CCFLAGS} -c tissue.cc -g laminate2.o: laminate2.cc g++ ${CCFLAGS} -c laminate2.cc -g seer_dfm.o: seer_dfm.cc g++ ${CCFLAGS} -c seer_dfm.cc -g clean: rm -f *.o
Pour cela, je dois fortement modifier mon makefile.
Est-ce que qqn pourrait me donner les régles de base pour faire un makefile tenant compte d'une arborescence ainsi que des différentes dépendances???
Merci beaucoup,
Bonne aprés-midi,
Xavier
Partager