Skip to content

repelliuss/makemake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Makemake save us! Makemake and its moon - ESA/Hubble

add readme

Examples

Simple C project

CC := gcc			# Makemake input
PROJECT := myproject

all: $(PROJECT)			# Default executable target
.PHONY: all

include Makemake

$(eval $(reset_build))		# Not needed but good habit
# Build inputs
NAME := $(PROJECT)
SRC_DIR := src
SRC_EXT := c
CFLAGS := -O2
$(eval $(make_build))

More complex case

CC := g++			# Makemake input
PROJECT := myproject

all: exe			# Default target
.PHONY: all

# Syntactic sugars for exposed targets for specified build

# Default build
exe: $(PROJECT)			# Target for binary
lib: lib$(PROJECT)		# Target for library
asm: asm_$(PROJECT)		# Target for assembly files

# dbg variant build
exe_dbg: $(PROJECT)_dbg
lib_dbg: lib$(PROJECT)_dbg
asm_dbg: asm_$(PROJECT)_dbg

.PHONY: exe lib asm exe_dbg lib_dbg asm_dbg

include Makemake

$(eval $(reset_build))		# Not needed but good habit
# Build inputs
NAME := $(PROJECT)
SRC_DIR := src
SRC_EXT := cpp
INCLUDE_DIR := lib
CFLAGS := -O2 -Wall -Wextra -std=c++17
LDFLAGS := -pthread
$(eval $(make_build))

VARIANT := dbg			# Debug variant, notice not resetting the build
CFLAGS := -g -DDEBUG -Wall -Wextra -std=c++17
$(eval $(make_build))

About

make make Makefile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published