37 lines
791 B
Makefile
37 lines
791 B
Makefile
|
# Common GNU Make rules for building the project
|
||
|
|
||
|
# This makefile is expected to be included after the variables given
|
||
|
# have been defined:
|
||
|
#
|
||
|
# NAME=name
|
||
|
#
|
||
|
# TARGET=ee|iop
|
||
|
#
|
||
|
# KIND=bin|lib
|
||
|
#
|
||
|
# SRCS=[... source-file-list]
|
||
|
#
|
||
|
|
||
|
debug_Valid := y
|
||
|
release_Valid := y
|
||
|
|
||
|
ifneq ($($(CONFIG)_Valid),y)
|
||
|
$(error Invalid configuration $(CONFIG) specified)
|
||
|
endif
|
||
|
|
||
|
BINDIR = $(TOP)/bin
|
||
|
OBJDIR = obj/$(CONFIG)
|
||
|
|
||
|
|
||
|
# include target-specific recipies specifying how to
|
||
|
# build for the target.
|
||
|
include $(TOP)/build/$(TARGET)-common.mk
|
||
|
#include $(TOP)/build/$(TARGET)-$(KIND).mk
|
||
|
|
||
|
FINALNAME=$(NAME)_$(CONFIG)
|
||
|
|
||
|
OBJECTS := $(patsubst %.c,obj/$(CONFIG)/%.o,$(filter %.c,$(SRCS)))
|
||
|
OBJECTS += $(patsubst %.cpp,obj/$(CONFIG)/%.o,$(filter %.cpp,$(SRCS)))
|
||
|
OBJECTS += $(patsubst %.s,obj/$(CONFIG)/%.o,$(filter %.s,$(SRCS)))
|
||
|
|