#############################################################################
# Automatically generated from /usr/obj/ports/qt2-3.2/qt-2.3.2/./examples/glpixmap/Makefile.in
# Build options from 
#############################################################################

QT_CXXFLAGS_OPT = -DQT_BUILTIN_GIF_READER=1 -DQT_XFT -fno-exceptions  $(SYSCONF_CXXFLAGS_OPENGL)
QT_CFLAGS_OPT   = -fno-exceptions  $(SYSCONF_CXXFLAGS_OPENGL)
QT_LIBS_OPT	=   -lSM -lICE -lXft $(SYSCONF_LFLAGS_OPENGL) $(SYSCONF_LIBS_OPENGL) -lpng -lz -ljpeg -lmng -llcms -ljpeg 
QT_MODULE_OBJ      = \
	    $(OBJECTS_tools) \
	    $(OBJECTS_kernel) \
	    $(OBJECTS_widgets) \
	    $(OBJECTS_dialogs) \
	    $(OBJECTS_iconview) \
	    $(OBJECTS_workspace) \
	    $(OBJECTS_network) \
	    $(OBJECTS_canvas) \
	    $(OBJECTS_table) \
	    $(OBJECTS_xml) \
	    $(OBJECTS_opengl) 

# Compiling
INTERFACE_DECL_PATH 	= .
SYSCONF_CXX		= $(SYS_CXX)
SYSCONF_CC		= $(SYS_CC)
DASHCROSS		= 

# Compiling with support libraries
SYSCONF_CXXFLAGS_X11	= -I/usr/X11R6/include -I/usr/local/include/libpng -I/usr/local/include
SYSCONF_CXXFLAGS_QT	= -I$(QTDIR)/include
SYSCONF_CXXFLAGS_OPENGL	= -I/usr/X11R6/include

# Compiling YACC output
SYSCONF_CXXFLAGS_YACC     = -Wno-unused -Wno-parentheses

# Linking with support libraries
SYSCONF_RPATH_X11	= 
SYSCONF_RPATH_QT	= 
SYSCONF_RPATH_OPENGL	= 

# Linking with support libraries
# X11
SYSCONF_LFLAGS_X11	= -L/usr/X11R6/lib -L$(QTDIR)/lib -L/usr/local/lib
SYSCONF_LIBS_X11	= -lXext -lX11 -lm
# Qt, Qt+OpenGL
SYSCONF_LFLAGS_QT	= -L$(QTDIR)/lib
SYSCONF_LIBS_QT		= -lqt$(QT_THREAD_SUFFIX)
SYSCONF_LIBS_QT_OPENGL	= 
# OpenGL
SYSCONF_LFLAGS_OPENGL	= -pthread -L/usr/X11R6/lib
SYSCONF_LIBS_OPENGL	= -lGLU -lGL -lXmu
# Yacc
SYSCONF_LIBS_YACC	= 

# Linking applications
SYSCONF_LINK		= $(SYS_CXX)
SYSCONF_LFLAGS		= -L/usr/X11R6/lib -L$(QTDIR)/lib -L/usr/local/lib
SYSCONF_LIBS		= -lz

# Link flags for shared objects
SYSCONF_LFLAGS_SHOBJ	= -shared -fPIC

# Flags for threading
SYSCONF_CFLAGS_THREAD	= -pthread
SYSCONF_CXXFLAGS_THREAD	= -pthread
SYSCONF_LFLAGS_THREAD	= -pthread
SYSCONF_LIBS_THREAD	= -pthread

# Meta-object compiler
SYSCONF_MOC		= $(QTDIR)/bin/moc

# UI compiler
SYSCONF_UIC		= $(QTDIR)/bin/uic

# Linking shared libraries
#   - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
#   - Place target in $(DESTDIR) - which has a trailing /
#   - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
#
SYSCONF_LINK_SHLIB	= $(SYS_CXX) -shared -fPIC
SYSCONF_LINK_TARGET_SHARED	= lib$(TARGET).so.$(VER_MAJ).`expr $(VER_MIN) \* 10 + $(VER_PATCH)`
SYSCONF_LINK_LIB_SHARED	= $(SYSCONF_LINK_SHLIB) $(LFLAGS) -o $(DESTDIR)$(SYSCONF_LINK_TARGET_SHARED) $(OBJECTS) $(OBJMOC) $(LIBS)

# Linking static libraries
#   - Build the $(TARGET) library, eg. lib$(TARGET).a
#   - Place target in $(DESTDIR) - which has a trailing /
#
SYSCONF_AR		= ar q
SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
SYSCONF_LINK_LIB_STATIC	= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
				 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) ; \
				 ranlib $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC)
# Compiling application source
SYSCONF_CXXFLAGS	= $(SYS_CXXFLAGS)
SYSCONF_CFLAGS		= $(SYS_CFLAGS)
# Default link type (static linking is still be used where required)
SYSCONF_LINK_LIB	= $(SYSCONF_LINK_LIB_SHARED)
SYSCONF_LINK_TARGET	= $(SYSCONF_LINK_TARGET_SHARED)
# Compiling library source
SYSCONF_CXXFLAGS_LIB	= -fPIC
SYSCONF_CFLAGS_LIB	= -fPIC
# Compiling shared-object source
SYSCONF_CXXFLAGS_SHOBJ	= -fPIC
SYSCONF_CFLAGS_SHOBJ	= -fPIC
# Linking Qt
SYSCONF_LIBS_QTLIB	= $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
# Linking Qt applications
SYSCONF_LIBS_QTAPP	= 
#############################################################################

####### Compiler, tools and options

CXX	=	$(SYSCONF_CXX) $(QT_CXX_MT)
CXXFLAGS=	$(SYSCONF_CXXFLAGS_OPENGL) $(SYSCONF_CXXFLAGS_QT) $(SYSCONF_CXXFLAGS)
CC	=	$(SYSCONF_CC) $(QT_C_MT)
CFLAGS	=	$(SYSCONF_CFLAGS)
INCPATH =	
LFLAGS	=	$(SYSCONF_LFLAGS_OPENGL) $(SYSCONF_LFLAGS_QT) $(SYSCONF_RPATH_QT) $(SYSCONF_LFLAGS) $(QT_LFLAGS_MT)
LIBS	=	$(SUBLIBS) -lm $(SYSCONF_LIBS_OPENGL) $(SYSCONF_LIBS_QT) $(SYSCONF_LIBS) $(SYSCONF_LIBS_QTAPP)
MOC	=	$(SYSCONF_MOC)
UIC	=	$(SYSCONF_UIC)

####### Target

DESTDIR = ./
VER_MAJ = 1
VER_MIN = 0
VER_PATCH = 0
TARGET	= glpixmap
TARGET1 = lib$(TARGET).so.$(VER_MAJ)

####### Files

HEADERS =	glbox.h \
		globjwin.h
SOURCES =	glbox.cpp \
		globjwin.cpp \
		main.cpp
OBJECTS =	glbox.o \
		globjwin.o \
		main.o
INTERFACES =    
UICDECLS =      
UICIMPLS =      
SRCMOC	=	moc_glbox.cpp \
		moc_globjwin.cpp
OBJMOC	=	moc_glbox.o \
		moc_globjwin.o


####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(DESTDIR)$(TARGET)

$(DESTDIR)$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS)
	$(SYSCONF_LINK) $(LFLAGS) -o $(DESTDIR)$(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
	tmake glpixmap.pro

clean:
	-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS)
	-rm -f *~ core
	-rm -f allmoc.cpp

####### Extension Modules

listpromodules:
	@echo 

listallmodules:
	@echo 

listaddonpromodules:
	@echo 

listaddonentmodules:
	@echo 


REQUIRES=opengl

####### Sub-libraries


###### Combined headers



####### Compile

glbox.o: glbox.cpp \
		glbox.h

globjwin.o: globjwin.cpp \
		globjwin.h \
		glbox.h

main.o: main.cpp \
		globjwin.h

moc_glbox.o: moc_glbox.cpp \
		glbox.h

moc_globjwin.o: moc_globjwin.cpp \
		globjwin.h

moc_glbox.cpp: glbox.h
	$(MOC) glbox.h -o moc_glbox.cpp

moc_globjwin.cpp: globjwin.h
	$(MOC) globjwin.h -o moc_globjwin.cpp


