############################################################################## # # Makefile for a simple glut example # # Description: # # ############################################################################## ############################################################################## # This file defines the following targets: # =========================================================================== # or all: makes your application. # # depend: makes dependencies. # # clean: removes all the usual stuff (if your Makefile is checked in, it will # be removed too... you might then want to do a "co Makefile") # # tags: creates emacs style TAGS file # # ctags: creates vi style TAGS file # ############################################################################## SHELL = /bin/sh ############################################################################## # Application file definitions -- EDIT THESE ############################################################################## # You may need to make sub-definitions for these definitions if you have # multiple languages, or other requirements. # All your source files SDSRCS= uistate.cpp SRCS=$(SDSRCS) $(ARCHSRCS) # for renderman shaders SHADERSRCS= # C-language source, to compile with cc SDCSRCS= CSRCS=$(SDCSRCS) $(ARCHCSRCS) # source files with no associated .o SRCSNOO= # source files with no associated .h SRCSNOH=main.cpp HDRSNOS= # sources that are #include'd, and have no associated .o TABLESRCS= ALLSRCS=$(SRCS) $(CSRCS) $(SRCSNOH) $(SRCSNOO) $(TABLESRCS) $(SHADERSRCS) # All the local .h files (these are not automatically depended) HDRS=$(HDRSNOS) ${SRCS:.cpp=.h} ${CSRCS:.c=.h} ${SRCSNOO:.cpp=.h} # All .o files generated COBJS=${CSRCS:.c=.o} OBJS=$(COBJS) ${SRCS:.cpp=.o} ALLOBJS=$(OBJS) ${SRCSNOH:.cpp=.o} # Man pages, etc. (leave blank if none) DOCS= # Application name TARGET=simple # Library name LIB=lib$(TARGET).a # Final-stage application compiler (or linker) name (cc, cs, cmf, f77,...) ############################################################################## # Application-specific definitions -- EDIT THESE ############################################################################## # Put any defines or misc. C compiler flags here. These will be used to # build your .o's. This line is usually left blank. # # cc flags CDEF= # CC flags CCDEF= # turn assertions of with -DNDEBUG DEBUG=-g CCDEBUG=-g COPTS=-fullwarn -Xcpluscomm -xansi -32 CCOPTS=+w +p -xansi -32 -woff 3262 LIBOPTS= LIBS= -lglut -lXmu -lXext -lX11 -lGL -lGLU -lm INCS= DEPOPTS=-M DEPLINE=1> .dep # ---------------------------------------------------------------------------- # -- You shouldn't need to edit anything below here, unless you have more # -- than one target or are building a library, or you're doing something # -- nonstandard. # ---------------------------------------------------------------------------- ############################################################################## # Language definitions ############################################################################## CFLAGS=$(INCS) $(COPTS) $(CDEF) $(DEBUG) CCFLAGS=$(INCS) $(CCOPTS) $(CCDEF) $(CCDEBUG) # Final-stage linker flags (-L goes here) CC=CC cc=cc TARGET_COMPILER_FLAGS=$(CCFLAGS) $(LIBOPTS) TARGET_COMPILER=$(CC) ############################################################################## # extra default rules ############################################################################## .SUFFIXES: .cpp .c .C .C: $(CC) $(CFLAGS) -o $@ $< .cpp: $(CC) $(CFLAGS) -o $@ $< .c: $(cc) $(CFLAGS) -o $@ $< .C.o: $(CC) $(CCFLAGS) -c $< .cpp.o: $(CC) $(CCFLAGS) -c $< .c.o: $(cc) $(CFLAGS) -c $< # This rule must be first. It insures that the desired target is the default. all: $(TARGET) ############################################################################## # Application-specific rules and dependencies - may need editing ############################################################################## $(TARGET): $(ALLOBJS) $(TARGET_COMPILER) -o $@ $(TARGET_COMPILER_FLAGS) \ $(ALLOBJS) $(LIBS) @echo $@ is made. ############################################################################## # General-purpose targets - do not edit, in general: # You may have to edit the depend line if you need extra includes. ############################################################################## depend: $(ALLSRCS) $(HDRS) $(CC) $(CCFLAGS) $(DEPOPTS) $(ALLSRCS) $(DEPLINE) tags: etags $(ALLSRCS) $(HDRS) ctags: ctags $(ALLSRCS) $(HDRS) clean: rm -f $(TARGET) $(OBJS) *.slo *.o *~ *.s \ .dep *.a *..c ptrepository/* TAGS \ ii_files/* \ core a.out \#* *.bak *.BAK *.CKP \ *.Addrs *.Counts *.pixie .\#* ; touch .dep; chmod 666 .dep .IGNORE: # DO NOT DELETE THIS LINE -- make depend depends on it. include .dep