Bonjour!!
Ma question est par rapport au makefile, je travail dans un project qui doit afficher de trucs opengl sur une interface wxWidgets, maintenant j'ai le 2 trucs séparément et je veux les mettre ensemble en créant un seul makefile, mais je ne arrive pas puisque je dois mettre plaine d'option pour la compilation opengl que je ne peux pas le supprimer.
je vous montre les 2 makefile:
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
63
64
65
66
67
68
69
70
71
72 ////////////////////////// OPENGL//////////////////////////////////////////////// # LINUX #--------------------------------------------------------------------- # LINUX -lXmu -lXt -lSM -lICE -lXext -lXi #--------------------------------------------------------------------- INCLUDE= -I /usr/include/GL LIB= -L /usr/X11R6/lib -lglut -lGLU -lGL -lX11 -lz -lm -Wl CC=g++ OPT= -g OBJ=Obj SRC=Src exec: $(OBJ)/exec.o $(OBJ)/graphique.o $(OBJ)/CSFReader.o $(OBJ)/image.o $(OBJ)/ColorChart.o $(OBJ)/Point3D.o $(CC) -o exec $(OBJ)/exec.o $(OBJ)/graphique.o $(OBJ)/CSFReader.o $(OBJ)/image.o $(OBJ)/ColorChart.o $(OBJ)/Point3D.o $(LIB) $(OBJ)/exec.o: $(SRC)/exec.c $(CC) -c $(SRC)/exec.c -o $(OBJ)/exec.o $(INCLUDE) $(OPT) $(OBJ)/graphique.o: $(SRC)/graphique.c $(CC) -c $(SRC)/graphique.c -o $(OBJ)/graphique.o $(INCLUDE) $(OPT) $(OBJ)/CSFReader.o: $(SRC)/CSFReader.cpp $(SRC)/CSFReader.hpp $(CC) -c $(SRC)/CSFReader.cpp -o $(OBJ)/CSFReader.o $(INCLUDE) $(OPT) $(OBJ)/image.o: $(SRC)/image.c $(CC) -c $(SRC)/image.c -o $(OBJ)/image.o $(INCLUDE) $(OPT) $(OBJ)/ColorChart.o: $(SRC)/Utils/ColorChart.cpp $(SRC)/Utils/ColorChart.hpp $(CC) -c $(SRC)/Utils/ColorChart.cpp -o $(OBJ)/ColorChart.o $(INCLUDE) $(OPT) $(OBJ)/Point3D.o: $(SRC)/Point3D.hpp $(SRC)/Point3D.cpp $(CC) -c $(SRC)/Point3D.cpp -o $(OBJ)/Point3D.o $(INCLUDE) $(OPT) clean: rm -r $(OBJ)/*.o exec //////////////////// et le truc de base pour wxWIDGETS//////////////////////////////////////////////// # by default, wx-config from the PATH is used WX_CONFIG := wx-config # set this to the name of the main executable file PROGRAM = Myapp # if your program has more than one source file, add more .o files to the line # below OBJECTS = $(PROGRAM).o GL_Window.o # you shouldn't have to edit anything below this line CXX = $(shell $(WX_CONFIG) --cxx) #GLLIB = -lglut -lGL -lGLU GLLIB = $(shell $(WX_CONFIG) --libs gl) all: $(PROGRAM) .SUFFIXES: .o .cpp %.o : %.cpp $(CXX) -c `$(WX_CONFIG) --cxxflags` -o $@ $< $(PROGRAM): $(OBJECTS) $(CXX) -o $(PROGRAM) $(OBJECTS) `$(WX_CONFIG) --libs` $(GLLIB) clean: rm -f *.o $(PROGRAM)
alors les experts, comment je peux faire??????
Partager