Changed makefile.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -28,6 +28,7 @@
|
|||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
ray
|
ray
|
||||||
|
PhotonViewer/pviewer
|
||||||
|
|
||||||
# Others
|
# Others
|
||||||
textures/
|
textures/
|
||||||
|
14
Makefile
14
Makefile
@@ -1,5 +1,6 @@
|
|||||||
CXX = g++
|
CXX = g++
|
||||||
TARGET = ray
|
TARGET = ray pviewer
|
||||||
|
PVDIR = PhotonViewer
|
||||||
OBJECTS = main.o sampling.o camera.o environment.o disk.o plane.o sphere.o \
|
OBJECTS = main.o sampling.o camera.o environment.o disk.o plane.o sphere.o \
|
||||||
phong_brdf.o hsa_brdf.o directional_light.o point_light.o \
|
phong_brdf.o hsa_brdf.o directional_light.o point_light.o \
|
||||||
spot_light.o sphere_area_light.o disk_area_light.o scene.o tracer.o \
|
spot_light.o sphere_area_light.o disk_area_light.o scene.o tracer.o \
|
||||||
@@ -16,8 +17,8 @@ all: $(TARGET)
|
|||||||
debug: CXXFLAGS += -g
|
debug: CXXFLAGS += -g
|
||||||
debug: $(TARGET)
|
debug: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(OBJECTS)
|
ray: $(OBJECTS)
|
||||||
$(CXX) -o $(TARGET) $(OBJECTS) $(CXXFLAGS) $(LDLIBS)
|
$(CXX) -o $@ $^ $(CXXFLAGS) $(LDLIBS)
|
||||||
|
|
||||||
-include $(DEPENDS)
|
-include $(DEPENDS)
|
||||||
|
|
||||||
@@ -25,6 +26,11 @@ $(TARGET): $(OBJECTS)
|
|||||||
$(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o
|
$(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o
|
||||||
$(CXX) -MM $(CXXFLAGS) $*.cpp > $*.d
|
$(CXX) -MM $(CXXFLAGS) $*.cpp > $*.d
|
||||||
|
|
||||||
|
.PHONY: pviewer
|
||||||
|
pviewer:
|
||||||
|
$(MAKE) $(MFLAGS) -C $(PVDIR)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(TARGET) $(OBJECTS) $(DEPENDS)
|
$(RM) ray $(OBJECTS) $(DEPENDS)
|
||||||
|
$(MAKE) $(MFLAGS) -C $(PVDIR) clean
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user