1# 2# Copyright 2016, Data61 3# Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4# ABN 41 687 119 230. 5# 6# This software may be distributed and modified according to the terms of 7# the BSD 2-Clause license. Note that NO WARRANTY is provided. 8# See "LICENSE_BSD2.txt" for details. 9# 10# @TAG(D61_BSD) 11# 12 13# Targets 14TARGETS := nethack.bin 15 16# Source files required to build the target 17CFILES := $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/*.c)) 18CFILES += $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/*/*.c)) 19CFILES += $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/*/*/*.c)) 20CFILES += $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/*/*/*/*.c)) 21HDRFILES += $(wildcard ${SOURCE_DIR}/src/nethack-3.4.3/include/*) 22 23NK_CFLAGS += -D_BSD_SOURCE -O2 24 25# Nethack configuration defines. 26NK_CFLAGS += -DTTY_GRAPHICS -DANSI_DEFAULT -DDLB -DNO_FILE_LINKS- -DDLBLIB 27 28# We also disable warnings when compiling nethack; there are a lot. 29NK_CFLAGS += -w 30 31# Libraries required to build the target 32LIBS := c sel4 refossys refos datastruct 33 34# Custom linker script 35NK_LDFLAGS += -T $(SOURCE_DIR)/linker.lds 36 37include $(SEL4_COMMON)/common.mk 38