82 lines
2.6 KiB
Makefile
Executable File
82 lines
2.6 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
#******************************************************************************#
|
|
# Include configuration #
|
|
#******************************************************************************#
|
|
-include Makefile.cfg
|
|
|
|
#******************************************************************************#
|
|
# Project main information #
|
|
#******************************************************************************#
|
|
# Project name.
|
|
NAME := cake.exe
|
|
|
|
# Maintainer information
|
|
MAINTAINER_NAME := Thomas \"Cakeisalie5\" Touhey
|
|
MAINTAINER_MAIL := thomas@touhey.fr
|
|
|
|
# Project license
|
|
LICENSE := GPLv2
|
|
|
|
# Project version
|
|
VERSION_MAJOR := 0
|
|
VERSION_MINOR := 1
|
|
INDEV := yes
|
|
VERSION := $(VERSION_MAJOR).$(VERSION_MINOR)$(if $(INDEV),-indev)
|
|
|
|
#******************************************************************************#
|
|
# Project directories #
|
|
#******************************************************************************#
|
|
# Headers directory - where all the headers are.
|
|
INCDIR := ./include
|
|
|
|
# Sources directory - where all the source files are.
|
|
SRCDIR := ./src
|
|
|
|
# Objects directory - where the objects will be put.
|
|
OBJDIR := ./obj
|
|
|
|
# Gint lib directory
|
|
GLIBDIR := ./libgint
|
|
|
|
# Gint include directory
|
|
GINCDIR := ./libgint/include
|
|
|
|
#******************************************************************************#
|
|
# Binary utilities #
|
|
#******************************************************************************#
|
|
# C Compiler
|
|
CC := sh3eb-elf-gcc
|
|
# - Check flags (for warnings enabling)
|
|
CHKFLAGS := -Wall -Wextra
|
|
# - More flags (for profiling, ...)
|
|
#CMOREFLAGS :=
|
|
# - All of the C compiler flags
|
|
CFLAGS := -m3 -mb -Os -ffreestanding -I $(INCDIR) -I $(GINCDIR) $(CHKFLAGS) \
|
|
-D AUTHOR="$(AUTHOR_NAME)" -D AUTHOR_MAIL="$(AUTHOR_MAIL)" \
|
|
-D LICENSE="$(LICENSE)" -D VERSION="$(VERSION)" \
|
|
$(CMOREFLAGS)
|
|
|
|
# Assembler
|
|
AS := sh3eb-elf-as
|
|
# Linker
|
|
LD := sh3eb-elf-gcc
|
|
# - Linker flags
|
|
LDFLAGS := -nostdlib -T osupd.ld -L $(GLIBDIR) -lgint -lc -lgcc
|
|
|
|
# Maker.
|
|
MAKE := make --no-print-directory -C
|
|
# Object copier
|
|
OBJCOPY := sh3eb-elf-objcopy
|
|
# Directory maker
|
|
MD := mkdir -p
|
|
# File remover
|
|
RM := rm -f
|
|
|
|
#******************************************************************************#
|
|
# Look for sources #
|
|
#******************************************************************************#
|
|
# SOURCES
|
|
SRC := $(basename $(notdir $(shell find $(SRCDIR) -name "*.[cs]")))
|
|
|
|
# END OF FILE
|