Page MenuHomec4science

makefile
No OneTemporary

File Metadata

Created
Sun, Dec 22, 07:01

makefile

NAME := Exercice5
BIN := $(NAME)
CC := g++
INCLUDES := -I include
CPP11 := -std=c++17
CONST := -DDEBUG
# other required libraries
LIBS := #add libraries
CSOURCES := $(wildcard src/*.cpp)
OBJECTS := $(patsubst src/%.cpp,bin/%.o,$(CSOURCES))
.PHONY: dirs clean install
all: $(BIN)
$(BIN): $(OBJECTS) dirs
$(CC) $(CONST) -o $@ $(CPP11) $(OBJECTS) $(INCLUDES) $(LIBS)
$(OBJECTS): bin/%.o : src/%.cpp $(CSOURCES) dirs
@printf "\n"
$(CC) $(CONST) -c $< $(CPP11) -o $@ $(INCLUDES)
install:
sudo cp -i bin/$(NAME) /usr/bin
dirs:
mkdir -p bin

Event Timeline