Changeset 8e232ce in opengl-game for makefile


Ignore:
Timestamp:
Aug 18, 2017, 3:36:27 PM (7 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
485424b
Parents:
201e2f8
Message:

Fix the error where unchanged .cpp dependencies don't get included in the build command generated by make

File:
1 edited

Legend:

Unmodified
Added
Removed
  • makefile

    r201e2f8 r8e232ce  
    1010endif
    1111
     12# If I were generating.o files as well, I should use $? instead of $^
     13# as this well prevent regenerating .o files for unchanged .cpp files
     14
    1215newgame: new-game.cpp logger.cpp
    13         $(CC) $? $(DEP) $(CFLAGS) -o $@
     16        $(CC) $^ $(DEP) $(CFLAGS) -o $@
    1417
    1518pong: pong.cpp logger.cpp
    16         $(CC) $? $(DEP) $(CFLAGS) -o $@
     19        $(CC) $^ $(DEP) $(CFLAGS) -o $@
    1720
    1821mygame: mygame.cpp common/shader.cpp common/texture.cpp common/controls-new.cpp
    19         $(CC) $? $(DEP) $(CFLAGS) -o $@
     22        $(CC) $^ $(DEP) $(CFLAGS) -o $@
    2023
    2124demo: game06.cpp common/shader.cpp common/texture.cpp common/controls.cpp
    22         $(CC) $? $(DEP) $(CFLAGS) -o $@
     25        $(CC) $^ $(DEP) $(CFLAGS) -o $@
    2326
    2427clean:
Note: See TracChangeset for help on using the changeset viewer.