Skip to content

Instantly share code, notes, and snippets.

@m0hadang
Last active March 9, 2024 03:37
Show Gist options
  • Select an option

  • Save m0hadang/958375bbcbd3ebe6d47f430b9b93058b to your computer and use it in GitHub Desktop.

Select an option

Save m0hadang/958375bbcbd3ebe6d47f430b9b93058b to your computer and use it in GitHub Desktop.
Makefile sample

Makefile sample

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/*
make all -B main=myexam
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