Various makefile and installation things.
main() is now always in the program. Also added a macro that doesn't set main at all so that users can have their own. The isosurf sample doesn't work anymore. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,13 +11,21 @@
|
||||
|
||||
PROGRAM=cube
|
||||
|
||||
OPENGLHOME=/home/jacs/mesa/Mesa-2.3
|
||||
CC = gcc
|
||||
|
||||
EXTRACPPFLAGS=-I$(OPENGLHOME)/include
|
||||
EXTRALDFLAGS=-L$(OPENGLHOME)/lib
|
||||
EXTRALDLIBS=-lMesaGL -lMesaGLU
|
||||
OBJECTS = $(PROGRAM).o
|
||||
|
||||
OBJECTS=$(PROGRAM).o
|
||||
# implementation
|
||||
|
||||
include ../../../src/makeprog.env
|
||||
.SUFFIXES: .o .cpp
|
||||
|
||||
.cpp.o :
|
||||
$(CC) -c `wx-config --cflags` -o $@ $<
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl -lMesaGL -lMesaGLU
|
||||
|
||||
clean:
|
||||
rm -f *.o $(PROGRAM)
|
||||
|
@@ -330,12 +330,20 @@ void TestGLCanvas::OnPaint( wxPaintEvent& event )
|
||||
// OnPaint handlers must always create a wxPaintDC.
|
||||
wxPaintDC dc(this);
|
||||
|
||||
#ifndef __WXMOTIF__
|
||||
if (!GetContext()) return;
|
||||
#endif
|
||||
|
||||
draw1();
|
||||
SwapBuffers();
|
||||
}
|
||||
|
||||
void TestGLCanvas::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
#ifndef __WXMOTIF__
|
||||
if (!GetContext()) return;
|
||||
#endif
|
||||
|
||||
SetCurrent();
|
||||
int width, height;
|
||||
GetClientSize(& width, & height);
|
||||
|
@@ -11,16 +11,24 @@
|
||||
|
||||
PROGRAM=isosurf
|
||||
|
||||
OPENGLHOME=/home/jacs/mesa/Mesa-2.3
|
||||
CC = gcc
|
||||
|
||||
EXTRACPPFLAGS=-I$(OPENGLHOME)/include
|
||||
EXTRALDFLAGS=-L$(OPENGLHOME)/lib
|
||||
EXTRALDLIBS=-lMesaGL -lMesaGLU
|
||||
OBJECTS = $(PROGRAM).o
|
||||
|
||||
OBJECTS=$(PROGRAM).o
|
||||
EXTRATARGETS=isosurf.dat
|
||||
# implementation
|
||||
|
||||
include ../../../src/makeprog.env
|
||||
.SUFFIXES: .o .cpp
|
||||
|
||||
.cpp.o :
|
||||
$(CC) -c `wx-config --cflags` -o $@ $<
|
||||
|
||||
all: $(PROGRAM) isosurf.dat
|
||||
|
||||
$(PROGRAM): $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl -lMesaGL -lMesaGLU
|
||||
|
||||
clean:
|
||||
rm -f *.o $(PROGRAM)
|
||||
|
||||
isosurf.dat: isosurf.dat.gz
|
||||
gzip -c -d isosurf.dat.gz > isosurf.dat
|
||||
|
@@ -7,15 +7,23 @@
|
||||
#
|
||||
# Makefile for penguin example (UNIX).
|
||||
|
||||
PROGRAM=penguin
|
||||
CPP = g++
|
||||
CC = gcc
|
||||
|
||||
OPENGLHOME=/home/jacs/mesa/Mesa-2.3
|
||||
Penguin: penguin.o trackball.o lw.o
|
||||
$(CPP) -o Penguin \
|
||||
penguin.o trackball.o lw.o \
|
||||
`wx-config --libs` -lwx_gtk_gl -lMesaGL -lMesaGLU
|
||||
|
||||
EXTRACPPFLAGS=-I$(OPENGLHOME)/include # -I../../motif
|
||||
EXTRALDFLAGS=-L$(OPENGLHOME)/lib
|
||||
EXTRALDLIBS=-lMesaGL -lMesaGLU
|
||||
penguin.o: penguin.cpp
|
||||
$(CPP) `wx-config --cflags` -I../../gtk -c penguin.cpp
|
||||
|
||||
OBJECTS=$(PROGRAM).o trackball.o lw.o
|
||||
lw.o: lw.cpp
|
||||
$(CPP) `wx-config --cflags` -I../../gtk -c lw.cpp
|
||||
|
||||
include ../../../src/makeprog.env
|
||||
trackball.o: trackball.c
|
||||
$(CC) `wx-config --cflags` -I../../gtk -c trackball.c
|
||||
|
||||
clean:
|
||||
rm -f *.o Penguin
|
||||
|
||||
|
Reference in New Issue
Block a user