fomu-flash/Makefile
Your Name 09fe20efda fomu-flash: first full commit
Signed-off-by: Your Name <you@example.com>
2018-11-28 13:19:51 -05:00

86 lines
2.1 KiB
Makefile

PACKAGE = fomu-flash
ADD_CFLAGS =
ADD_LFLAGS =
GIT_VERSION= $(shell git describe --tags)
#TRGT ?= arm-none-eabi-
CC = $(TRGT)gcc
CXX = $(TRGT)g++
OBJCOPY = $(TRGT)objcopy
RM = rm -rf
COPY = cp -a
PATH_SEP = /
ifeq ($(OS),Windows_NT)
COPY = copy
RM = del
PATH_SEP = \\
endif
DBG_CFLAGS = -ggdb -g -DDEBUG -Wall
DBG_LFLAGS = -ggdb -g -Wall
CFLAGS = $(ADD_CFLAGS) \
-Wall -Wextra -O2 \
-DGIT_VERSION=u\"$(GIT_VERSION)\"
CXXFLAGS = $(CFLAGS)
LFLAGS = $(ADD_LFLAGS) $(CFLAGS) \
OBJ_DIR = .obj
CSOURCES = $(wildcard *.c)
CPPSOURCES = $(wildcard *.cpp)
ASOURCES = $(wildcard *.S)
COBJS = $(addprefix $(OBJ_DIR)/, $(notdir $(CSOURCES:.c=.o)))
CXXOBJS = $(addprefix $(OBJ_DIR)/, $(notdir $(CPPSOURCES:.cpp=.o)))
AOBJS = $(addprefix $(OBJ_DIR)/, $(notdir $(ASOURCES:.S=.o)))
OBJECTS = $(COBJS) $(CXXOBJS) $(AOBJS)
VPATH = .
QUIET = @
ALL = all
TARGET = $(PACKAGE)
CLEAN = clean