#----------------------------------------------------------------------- # Look for "--->" for things that you need to change for your # particular configuration. #----------------------------------------------------------------------- #----------------------------------------------------------------------- # Variable settings: Set these according to your system configuration # # Compiler/Linker settings: # ------------------------- # C++ Your favorite C++ compiler (or C compiler). # CFLAGS Your compilation flags. # -g compile for debugging (e.g., dbx or gdb). # -O2 optimize code # -Wall give all warnings (highly recommended with # OpenGL programs) # MISC_LIBS Any miscellaneous libraries that your program # needs. # add -lm here for math library # add -lposix4 here for clock_gettime() # (a real-time clock on Solaris machines). # # # System/Platform-dependent settings (which you will need to set): # ---------------------------------------------------------------- # OGL_DIR Directory where OpenGL (or Mesa) resides # OGL_LIBS OpenGL library names # X_LIB X11 lib directory (where libX11, libXext live) # # System/Platform-dependent settings (you should not need to set): # ---------------------------------------------------------------- # OGL_LIB_DIR OpenGL library directory (where libGL lives) # OGL_INC_DIR OpenGL linclude directory (where GL/gl.h lives) # OGL_LFLAGS Loader flags for OpenGL stuff # X_LFLAGS Loader flags for X11 stuff # LD_FLAGS All loader flags #----------------------------------------------------------------------- #----------------------------------------------------------------------- # ---> USE THESE DEFINITIONS FOR WAM AND GLUE LAB MACHINES #----------------------------------------------------------------------- OGL_DIR = /usr/local/Mesa OGL_LIBS = -lMesaGLU -lMesaGL GLUT_DIR = /usr/local/Mesa GLUT_LIBS = -lglut X_LIB = /usr/local/X11R6.3/lib #----------------------------------------------------------------------- # ---> USE THESE DEFINITIONS FOR CSD JUNKFOOD LAB MACHINES #----------------------------------------------------------------------- # OGL_DIR = /usr/openwin # OGL_LIBS = -lGLU -lGL # GLUT_DIR = /usr/local/glut # GLUT_LIBS = -lglut # X_LIB = /usr/openwin/lib #----------------------------------------------------------------------- # Setting for all UMD platforms # ---> Set C++ to your C++ compiler # ---> Set CFLAGS according your desired option (debug/performance) #----------------------------------------------------------------------- C++ = g++ # CFLAGS = -g -Wall (for debugging) # CFLAGS = -O3 -Wall (for best performance) CFLAGS = -O3 -Wall MISC_LIBS = -lm OGL_LIB_DIR = $(OGL_DIR)/lib GLUT_LIB_DIR = $(GLUT_DIR)/lib OGL_INC_DIR = $(OGL_DIR)/include GLUT_INC_DIR = $(GLUT_DIR)/include OGL_LFLAGS = -L$(OGL_DIR)/lib -L$(GLUT_DIR)/lib -R$(OGL_DIR)/lib -R$(GLUT_DIR)/lib $(OGL_LIBS) $(GLUT_LIBS) INC_FLAGS = -I$(OGL_INC_DIR) -I$(GLUT_INC_DIR) LD_FLAGS = $(OGL_LFLAGS) $(X_LFLAGS) $(MISC_LIBS) X_LFLAGS = -L$(X_LIB) -R$(X_LIB) -lX11 -lXext -lXmu -lXi -lsocket #----------------------------------------------------------------------- # Compilation #----------------------------------------------------------------------- .SUFFIXES: .cpp .o # These are the user object files in the application SRCS = bmpLoader.cpp eventHandler.cpp main.cpp # obj files OBJS = bmpLoader.o eventHandler.o main.o # make objects assg1 : $(OBJS) Makefile $(C++) $(CFLAGS) $(OBJS) -o assg1 $(LD_FLAGS) clean: rm -f *.o core .cpp.o: $(C++) $(CFLAGS) $(INC_FLAGS) -c $*.cpp