Skip to content

Instantly share code, notes, and snippets.

@SolemnJoker
Last active November 7, 2020 06:49
Show Gist options
  • Save SolemnJoker/11f85f0b779535b5ae6355fbfa104168 to your computer and use it in GitHub Desktop.
Save SolemnJoker/11f85f0b779535b5ae6355fbfa104168 to your computer and use it in GitHub Desktop.
[makefile 记录] #makefile
CC := g++
C_FLAGS := -std=c++14 -Wall -Wextra
BIN := .
SRC := .
INCLUDE := include
LIB := lib
LIBRARIES :=
EXECUTABLE := main
all: $(BIN)/$(EXECUTABLE)
clean:
$(RM) $(BIN)/$(EXECUTABLE)
run: all
./$(BIN)/$(EXECUTABLE)
$(BIN)/$(EXECUTABLE): $(SRC)/*
$(CC) $(C_FLAGS) -I$(INCLUDE) -L$(LIB) $^ -o $@ $(LIBRARIES)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment