# build noise test program # PNG library # I use the mac one from fink.sourceforge.net # must install libpng3 package, not just libpng3-shlibs PNGINC = -I/sw/include PNGLIB = -L/sw/lib -lpng # OpenGL header and library directives GLINC = GLLIB = -framework GLUT -framework OpenGL \ -framework Carbon -lobjc # flags for C++ compiler & linker CXXFLAGS = -g $(PNGINC) $(GLINC) LDLIBS = -g $(PNGLIB) $(GLLIB) # files and intermediate files we create OBJS = noise.o view.o motion.o key.o draw.o shader.o pngtex.o PROG = noise # rule for building # program from .o files $(PROG): $(OBJS) $(CXX) -o $(PROG) $(OBJS) $(LDFLAGS) $(LDLIBS) # any .o from .c uses built-in rule # remove everything but the program clean: rm -f *~ *.o # remove everything including program clobber: clean rm -f $(PROG)