# Lineviewer - An extremely simple line viewing application # Copyright (C) 1999,2000 Mark R. Stevens # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ########################################################################## ## ## PART I Assignments typically changed by users. ## ## TARGET defines the program to build (modify to your program name) and ## OBJ defines the list of .o files for TARGET. Modify OBJ to be a list ## of object files separated by spaces. TARGET := lineViewer OBJ := lineViewer.o ########################################################################## ## ## PART II System Specific Setup. ## ## ## Run the `arch' command to query architecture type (hp400, sun, etc.) ## Run the `uname' command to query OS type (HPUX, SunOS, etc.) ARCH := $(shell arch) OSNAME := $(shell uname) ## Architecture and OS Specific include paths, libray paths and compiler ## Flags. OGLHOME := /s/parsons/l/sys/Mesa-3.0/ ## If you are running under Solaris do not forget to ## add $(OGLHOME)/lib to LD_LIBRARY_PATH! ifeq ($(OSNAME),HP-UX) CXX := /s/chopin/m/proj/vision6/egcs/HP-UX/bin/g++ INCL := -I$(OGLHOME)/include -I/usr/X11R6.3/include OPENGLLIB := -L$(OGLHOME)/lib/HP-UX -lMesaGL -lMesaGLU -lglut XLIB := -L/usr/X11R6.3/lib -lX11 -lXext -lXi -lXmu LOADLIBES := $(OPENGLLIB) $(XLIB) -lm CFLAGS := $(CFLAGS) -D_HPUX_SOURCE -DSHM endif ifeq ($(OSNAME),SunOS) CXX := /s/chopin/m/proj/vision6/egcs/SunOS/bin/g++ INCL := -I$(OGLHOME)/include SYSLIB := -lsocket -lgen -lm OPENGLLIB := -L$(OGLHOME)/lib/SunOS -lMesaGL -lMesaGLU -lglut XLIB := -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi LOADLIBES := $(OPENGLLIB) $(XLIB) $(SYSLIB) endif # Compiler options # (this is a special variable name recognized by GNU make) CFLAGS := $(OD) $(INCL) $(CFLAGS) CXXFLAGS := $(OD) $(INCL) $(CFLAGS) ########################################################################## ## ## PART III Make Targets (Should not need Changing) ## ##======================================================================== # The first target in the file is the default if you don't specify what # to make via an argument to `make'. Note that the `.PHONY' line # declares targets that don't correspond to actual file names. It's # not required, but is good practice to avoid problems if a file by # one of those names did get created. .PHONY : all clean all: $(TARGET) # The command `make clean' will delete all compiler output files, such # as .o object files and .d dependency files, and also the final target # file. Following this with `make' will force recompilation of your # entire program. This is useful if you want to recompile your program # on a different architecture machine. clean: rm -f $(OBJ) $(OBJ:.o=.d) $(TARGET) # This rule tells how to build the target program. The rule will # rebuild the target program if any of the $(OBJ) files are recompiled. # The automatic dependency processing below will automatically rebuild # any object file affected by a change to a source or header file. $(TARGET): $(OBJ) $(CXX) $(CFLAGS) -o $@ $^ $(LOADLIBES) # End of Makefile