-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·68 lines (52 loc) · 2.09 KB
/
Copy pathMakefile
File metadata and controls
executable file
·68 lines (52 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#! /usr/bin/make
# Generic Makefile that should work with any program you're going to compile.
# Any complaints should be directed at honghual@sfu.ca
#
# To compile and link your program all you have to do is run 'make' in the
# current directory.
# To clean up object files run 'make clean_object'.
# To delete any compiled files run 'make clean'.
# Originated in 2001 by Haris Teguh
# modified May-2012 by Honghua Li
# Including of non standard library files:
# INCLUDEDIR is where the header files can be found
# LIBDIR is where the library object files can be found
INCLUDEDIR=/usr/include/
LIBDIR=/usr/lib
# If you have more source files add them here
# SOURCE= scene.cpp image_util.cpp sphere.cpp vector.cpp trace.cpp raycast.cpp include/InitShader.cpp
#SOURCE= scene.cpp image_util.cpp object.cpp trace.cpp raycast.cpp include/InitShader.cpp
SOURCE= scene.cpp image_util.cpp object.cpp trace.cpp raycast.cpp
# The compiler we are using
CC= g++
# The flags that will be used to compile the object file.
# If you want to debug your program,
# you can add '-g' on the following line
#CFLAGS= -O3 -g -Wall -pedantic -DGL_GLEXT_PROTOTYPES
# remove '-D__NO_DISPLAY__' if want to have display
#CFLAGS= -O3 -g -DGL_GLEXT_PROTOTYPES -D__NO_DISPLAY__
CFLAGS= -O3 -g -DGL_GLEXT_PROTOTYPES
# The name of the final executable
EXECUTABLE= raycast
# The basic library we are using add the other libraries you want to link
# to your program here
# Linux (default)
LDFLAGS = -lGL -lglut -lGLEW -lXext -lX11 -lm
# If you have other library files in a different directory add them here
INCLUDEFLAG= -I. -I$(INCLUDEDIR) -I./include/
LIBFLAG= -L$(LIBDIR)
# Don't touch this one if you don't know what you're doing
OBJECT= $(SOURCE:.cpp=.o)
# Don't touch any of these either if you don't know what you're doing
#all: $(OBJECT) depend
all: $(OBJECT)
$(CC) $(CFLAGS) $(INCLUDEFLAG) $(LIBFLAG) $(OBJECT) -o $(EXECUTABLE) $(LDFLAGS)
#depend:
# $(CC) -M $(SOURCE) > depend
$(OBJECT):
$(CC) $(CFLAGS) $(INCLUDEFLAG) -c -o $@ $(@:.o=.cpp)
clean_object:
rm -f $(OBJECT)
clean:
rm -f $(OBJECT) depend $(EXECUTABLE)
#include depend