Created
September 14, 2015 16:07
-
-
Save XuankangLin/e277d042cdc7a494aecb to your computer and use it in GitHub Desktop.
Setting full path in Makefile under some directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CC=g++ | |
| HDIR=./include/ | |
| CFILES=main.cpp server.cpp | |
| OUTNAME=server | |
| # Something like this will prepend "./src/" to each of CFILES names, thus setting the correct full path! | |
| CFULL=${CFILES:%=./src/%} | |
| all: | |
| $(CC) -o $(OUTNAME) -pthread -I $(HDIR) $(CFULL) | |
| clear: | |
| rm -f *.out $(OUTNAME) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment