Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 13/03/2008, à 20:24

oaga552

Makefile - wxWidgets et OpenGl

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:

////////////////////////// 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??????:P
hmm:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/:/