libwindmill/Makefile.vars

83 lines
2.5 KiB
Makefile
Executable File

#!/usr/bin/make -f
#******************************************************************************#
# Include configuration #
#******************************************************************************#
-include Makefile.cfg
#******************************************************************************#
# Project main information #
#******************************************************************************#
# Project name and supported targets
NAME := windmill
# Maintainer information
MAINTAINER_NAME := Thomas \"Cakeisalie5\" Touhey
MAINTAINER_MAIL := thomas@touhey.fr
# Project version
MAJOR := 0
MINOR := 1
INDEV := yes
# Project version string
VERSION := $(MAJOR).$(MINOR)$(if $(INDEV),-indev)
#******************************************************************************#
# Project directories #
#******************************************************************************#
# Headers directory - where all the headers are.
INCDIR := ./include
# Sources directory - where all the sources are.
SRCDIR := ./src
# Objects directory - where the objects will be put.
OBJDIR := ./obj
#******************************************************************************#
# Binary utilities #
#******************************************************************************#
# Compiler
CC := sh3eb-elf-gcc
# - Check flags (warnings)
CWARN := -Wall -Wextra -Wno-attributes
# - For random manipulations (profiling, ...)
#CMOREFLAGS :=
# - All C compiling flags
CFLAGS := $(CWARN) -I $(INCDIR) -std=gnu11 -O2 -ffreestanding
# Assembler
AS := sh3eb-elf-as
# - All assembling flags
ASFLAGS :=
# Archiver
AR := sh3eb-elf-ar
# Directory maker
MD := mkdir -p
# Symbolic link maker
LN := ln -sf
# Copier
CP := cp
# Mover
MV := mv
# File remover
RM := rm -f
# Installer
INST := install
# GZipper
GZIP := gzip -f
#******************************************************************************#
# Look for modules and modules sources #
#******************************************************************************#
# Look up the sources
SRC := $(basename $(shell find $(SRCDIR) -mindepth 1 -type f \
-name "*.[cs]" -printf "%P\n"))
DIRS := $(sort $(dir $(SRC)))
# Look up the includes
INC := $(shell find $(INCDIR) -mindepth 1 -name "*.h")
# End of file.