Last active
March 9, 2024 03:37
-
-
Save m0hadang/958375bbcbd3ebe6d47f430b9b93058b to your computer and use it in GitHub Desktop.
Makefile sample
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
| CXX = g++ | |
| DIR = src | |
| BUILD_DIR = bin | |
| SRCS = $(shell find src -name '*.cc') | |
| INCLUDE = -Iinclude | |
| LIBS = -std=c++14 -g | |
| all: | |
| mkdir -p bin | |
| $(CXX) $(SRCS) example/$(main).cc -o $(BUILD_DIR)/$(main) $(LIBS) $(INCLUDE) | |
| ./bin/$(main) | |
| clean: | |
| rm -rf bin/* |
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
| make all -B main=myexam |
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
| PS C:\Users\red\Downloads\my-make-master> tree . /F | |
| 폴더 PATH의 목록입니다. | |
| 볼륨 일련 번호는 AE2E-9029입니다. | |
| C:\USERS\RED\DOWNLOADS\MY-MAKE-MASTER | |
| │ .gitignore | |
| │ Makefile | |
| │ README.md | |
| │ run_example.sh | |
| │ | |
| ├─.vscode | |
| │ launch.json | |
| │ tasks.json | |
| │ | |
| ├─example | |
| │ myexam.cc | |
| │ | |
| ├─include | |
| │ └─Foo | |
| │ MyFoo.hh | |
| │ | |
| └─src | |
| └─Foo | |
| MyFoo.cc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment