#
#  Makefile
#

#
#  RTEMS_MAKEFILE_PATH is typically set in an environment variable
#

EXEC=nettest
PGM=${ARCH}/$(EXEC)

# optional managers required
MANAGERS=io event semaphore

# C source names
CSRCS = init.c  test.c
COBJS_ = $(CSRCS:.c=.o)
COBJS = $(COBJS_:%=${ARCH}/%)

# C++ source names
CXXOBJS_ = $(CXXSRCS:.cpp=.o)
CXXOBJS = $(CXXOBJS_:%=${ARCH}/%)

# AS source names
ASSRCS =
ASOBJS_ = $(ASSRCS:.s=.o)
ASOBJS = $(ASOBJS_:%=${ARCH}/%)

# Libraries
LD_LIBS = -lnetworking
#LIBS = -lrtemsall -lc

DFLAGS_LD += -Wl --defsym

# RTEMS Managers
#MANAGERS = dpmem event io msg mp part region sem signal timer rtmon ext
MANAGERS = io msg sem timer rtmon event


include $(RTEMS_MAKEFILE_PATH)/Makefile.inc

include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/$(RTEMS_BSP)/make/leaf.cfg

CFLAGS_OPTIMIZE+=

OBJS= $(COBJS) $(CXXOBJS) $(ASOBJS)

all:    ${ARCH} $(PGM)

$(PGM): $(OBJS)
	$(make-exe)

htmldoc:
	kdoc2 -f html -d ./doc *.h 

clean:
	rm -rf ./doc
