a7a4098644
opengl apps were left out of the targets list on purpose so that only non-opengl apps would build. TODO: Determine a way to detect the presence of fltk opengl libs from within the Makefile using only fltk-config, so as to conditionally build the opengl examples. Do NOT use fltk's own build system (../makeinclude or cmake) to determine this, so the Makefiles will work as user examples. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
36 lines
1.0 KiB
Makefile
36 lines
1.0 KiB
Makefile
#
|
|
# Stuff every FLTK application might need
|
|
#
|
|
# If you take this for use in your own project, be sure to change
|
|
# the 'FLTKCONFIG' setting to point to where it's installed
|
|
# on your system. Common examples:
|
|
#
|
|
# FLTKCONFIG = /usr/local/bin/fltk-config
|
|
# FLTKCONFIG = /usr/local/src/fltk-1.3.x-svn/fltk-config
|
|
#
|
|
# Set .SILENT in your Makefile if you want 'quieter' builds.
|
|
#
|
|
|
|
ifeq '$(OS)' "Windows_NT"
|
|
EXEEXT = .exe
|
|
endif
|
|
|
|
FLTKCONFIG = ../fltk-config
|
|
CXX = $(shell $(FLTKCONFIG) --cxx)
|
|
CXXFLAGS = $(shell $(FLTKCONFIG) --cxxflags) -Wall -I.
|
|
LINKFLTK = $(shell $(FLTKCONFIG) --ldstaticflags)
|
|
LINKFLTK_GL = $(shell $(FLTKCONFIG) --use-gl --ldstaticflags)
|
|
LINKFLTK_IMG = $(shell $(FLTKCONFIG) --use-images --ldstaticflags)
|
|
LINKFLTK_ALL = $(shell $(FLTKCONFIG) --use-images --use-gl --ldstaticflags)
|
|
.SUFFIXES: .cxx .h .fl .o $(EXEEXT)
|
|
|
|
# HOW TO COMPILE
|
|
.cxx.o:
|
|
@echo "*** Compile $<..."
|
|
$(CXX) -I.. $(CXXFLAGS) -c $< -o $@
|
|
|
|
# HOW TO LINK
|
|
.o$(EXEEXT):
|
|
@echo "*** Linking $@..."
|
|
$(CXX) $< $(LINKFLTK) $(LINKFLTK_IMG) -o $@
|