Changed makefile.

This commit is contained in:
2017-03-01 12:41:28 -04:00
parent 7444b01bce
commit 23939fdc92
3 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@@ -28,6 +28,7 @@
*.out *.out
*.app *.app
ray ray
PhotonViewer/pviewer
# Others # Others
textures/ textures/

View File

@@ -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.