# ********************************************************************** 
# 
# THIS IS AN AUTO-GENERATED FILE. DO NOT EDIT DIRECTLY
# 
# To change the settings in here:
# 		- Right click on the project
#		- Select "Properties" option
#       - Use property pages to set options. Details given below 
#
# ********************************************************************** 
 
# These flags can be set from C/C++ build property page -> nios2-elf-gcc -> General
CFLAGS = -DALT_DEBUG -O0 -g -Wall

ASFLAGS = -Wa,-gdwarf2

# These flags can be set from C/C++ build property page -> nios2-elf-ar.archiver -> General
ARFLAGS = -src

# This project
PROJECT := pelmanism_lib

RM := rm -rf


# **********************************************************************
# Check for a space in the environment var SOPC_KIT_NIOS2

space = $(empty) $(empty)
space-to-question = $(subst $(space),?,$1)

HOST_OS :=  $(shell uname | head -c 3 | tr [:upper:] [:lower:])

SOPC_KIT_NIOS2 := $(strip $(SOPC_KIT_NIOS2))
ifneq ($(call space-to-question,$(SOPC_KIT_NIOS2)),$(SOPC_KIT_NIOS2))
# If there is a space in your SOPC_KIT_NIOS2 path, then it must be
# fixed.
ifeq ($(HOST_OS),cyg)
# Use short 8.3 dos path on Windows/Cygwin
SOPC_KIT_NIOS2 := $(shell cygpath --dos "$(SOPC_KIT_NIOS2)")
else
# Use a symlink to a unique dir in /tmp/altera_nios2 dir on Unix
SHELL := /bin/bash
USER = $(shell whoami)
DATE = $(shell date +%Y-%m-%d)
TMP_DIR = /tmp/altera_nios2-$(USER)
CREATE_TMP_DIR := $(shell mkdir -p $(TMP_DIR))
NIOS_VERSION_ID := $(shell nios2-elf-gcc -v 2>&1 | grep Altera | sed -e 's/[^0-9]//g')
TMP_SOPC_KIT_NIOS2 := $(TMP_DIR)/altera_nios2_kit_tmp-$(DATE)-$(NIOS_VERSION_ID)
CREATE_TMP_NIOS_DIR_CMD := if [ ! -d $(TMP_SOPC_KIT_NIOS2) ]; then ln -s "$(SOPC_KIT_NIOS2)" "$(TMP_SOPC_KIT_NIOS2)"; fi
CREATE_TMP_NIOS_DIR := $(shell $(CREATE_TMP_NIOS_DIR_CMD))
SOPC_KIT_NIOS2 := $(TMP_SOPC_KIT_NIOS2)
endif

export SOPC_KIT_NIOS2
endif
# **********************************************************************

# Every subdirectory with source files must be described here
SUBDIRS := \
. \

# Include the makefiles for each source subdirectory
-include ${patsubst %, %/subdir.mk, $(SUBDIRS)}
MAKEFILE_LIST += $(patsubst %, %/subdir.mk, $(SUBDIRS))


COMPONENTS_PROCESSOR := $(SOPC_KIT_NIOS2)/components/altera_nios2
COMPONENTS_OS := $(SOPC_KIT_NIOS2)/components/altera_hal

# Include HAL library makefile
LIB_MAKEFILE := $(SOPC_KIT_NIOS2)/components/altera_hal/build/lib.mk
include $(LIB_MAKEFILE)

includes:
	@echo $(CC) -DALTERA_INCLUDES -S $(CPPFLAGS) $(CFLAGS) $(GTF_GENERATED)/$(firstword $(C_SRCS))

