SHOW:
|
|
- or go back to the newest paste.
| 1 | #Makefile | |
| 2 | ||
| 3 | # $^ is "all of pererequisites of this rule" - must use when using wildcards, or *, as prereqs | |
| 4 | # $? is "all out-of-date prerequisites" | |
| 5 | # $@ is "the target of this rule" | |
| 6 | # $< is "first prereq" | |
| 7 | # | |
| 8 | # % is "a make wildcard" | |
| 9 | # * is "a shell wildcard" | |
| 10 | ||
| 11 | ||
| 12 | ||
| 13 | # false dependancy demo - can be useful sometimes. | |
| 14 | # | |
| 15 | # data-1-1.dat: stats.py | |
| 16 | # touch $@ | |
| 17 | # | |
| 18 | # data-1-2.dat : stats.py | |
| 19 | # touch $@ | |
| 20 | # | |
| 21 | ||
| 22 | ||
| 23 | # Pattern rule - note that make only uses this if there is no other rule to be used. | |
| 24 | # - note that make does not inherently force the target to be updated | |
| 25 | # in such a file. | |
| 26 | # - Likewise when make sees two or more pattern rules, it just uses | |
| 27 | # the first pattern rule it finds | |
| 28 | # | |
| 29 | # figure-%: figure-data-%.dat | |
| 30 | # stats.py $^ | |
| 31 | # | |
| 32 | # | |
| 33 | # | |
| 34 | ||
| 35 | COMPILER = g++ | |
| 36 | COMP_FLAGS = -std=c++11 -Wall | |
| 37 | SFML_DLLS_LINKED = -lsfml-graphics -lsfml-window -lsfml-system | |
| 38 | GL_DLLS_LINKED = -lopengl32 -lGLU32 | |
| 39 | ALL_DLLS_LINKED = $(SFML_DLLS_LINKED) $(GL_DLLS_LINKED) | |
| 40 | ||
| 41 | LIBRARY_PATH = D:\Dropbox\Projects\include | |
| 42 | PROJECT_PATH = D:\Dropbox\Projects\active\sfmlgame | |
| 43 | ||
| 44 | all: main.exe | |
| 45 | ||
| 46 | main.exe: main.cpp | |
| 47 | - | $(COMPILER) $< -o $@ $(COMP_FLAGS) -I"$(LIBRARY_PATH)" -I"$(PROJECT_PATH)" $(ALL_DLLS_LINKED)$ |
| 47 | + | $(COMPILER) $< -o $@ $(COMP_FLAGS) -I$(LIBRARY_PATH) -I$(PROJECT_PATH) $(ALL_DLLS_LINKED)$ |