diff --git a/.gitignore b/.gitignore index 7a3155a..6d49af4 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ *.out *.app ray +PhotonViewer/pviewer # Others textures/ diff --git a/Makefile b/Makefile index 8e2bb82..c40539d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CXX = g++ -TARGET = ray +TARGET = ray pviewer +PVDIR = PhotonViewer 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 \ 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: $(TARGET) -$(TARGET): $(OBJECTS) - $(CXX) -o $(TARGET) $(OBJECTS) $(CXXFLAGS) $(LDLIBS) +ray: $(OBJECTS) + $(CXX) -o $@ $^ $(CXXFLAGS) $(LDLIBS) -include $(DEPENDS) @@ -25,6 +26,11 @@ $(TARGET): $(OBJECTS) $(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o $(CXX) -MM $(CXXFLAGS) $*.cpp > $*.d +.PHONY: pviewer +pviewer: + $(MAKE) $(MFLAGS) -C $(PVDIR) + .PHONY: clean clean: - $(RM) $(TARGET) $(OBJECTS) $(DEPENDS) + $(RM) ray $(OBJECTS) $(DEPENDS) + $(MAKE) $(MFLAGS) -C $(PVDIR) clean diff --git a/PhotonViewer/pviewer b/PhotonViewer/pviewer deleted file mode 100755 index 5b8ed45..0000000 Binary files a/PhotonViewer/pviewer and /dev/null differ