Browse Source

Use make variables $@ and $^ where appropriate.

Sam Hocevar 9 years ago
parent
commit
d4f63c3844
2 changed files with 2 additions and 2 deletions
  1. 1 1
      examples/opengl2_example/Makefile
  2. 1 1
      examples/opengl3_example/Makefile

+ 1 - 1
examples/opengl2_example/Makefile

@@ -58,7 +58,7 @@ all: $(EXE)
 	@echo Build complete for $(ECHO_MESSAGE)
 
 $(EXE): $(OBJS)
-	$(CXX) -o $(EXE) $(OBJS) $(CXXFLAGS) $(LIBS)
+	$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
 
 clean:
 	rm -f $(EXE) $(OBJS)

+ 1 - 1
examples/opengl3_example/Makefile

@@ -59,7 +59,7 @@ all: $(EXE)
 	@echo Build complete for $(ECHO_MESSAGE)
 
 $(EXE): $(OBJS)
-	$(CXX) -o $(EXE) $(OBJS) $(CXXFLAGS) $(LIBS)
+	$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
 
 clean:
 	rm -f $(EXE) $(OBJS)