Skip to content

Instantly share code, notes, and snippets.

View erkanvatan's full-sized avatar

Erkan Vatan erkanvatan

  • Turkey / Istanbul
View GitHub Profile
@erkanvatan
erkanvatan / Makefile
Last active December 8, 2020 13:08
Simple Makefile for automatic C/C++ compile
TARGET_EXEC ?= a.out
BUILD_DIR ?= ./build
SRC_DIRS ?= ./
SRCS := $(shell find $(SRC_DIRS) -name '*.cpp' -or -name '*.c' -or -name '*.s')
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
DEPS := $(OBJS:.o=.d)
INC_DIRS := $(shell find $(SRC_DIRS) -type d)