Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

User:Simonea

From eLinux.org
Revision as of 21:46, 15 April 2010 by Simonea (Talk | contribs)

Jump to: navigation, search

Enrolled in ECE 597 at Rose-Hulman Institute of Technology, working on ECE597 Interactive Pong

Lab 5 Part C

I found the following makefile to work, while the suggested alterations and the file in "solutions/lab05c_x86_configuro/app" did not work for me:

# ****************************************************************************
# Makefile
#
# x86 makefile for lab 5 part c.
#
# **NOTE: ensure that the values in setpaths.mak are set properly for where 
#	  the actual packages are
# ****************************************************************************

include ../../setpaths.mak

#Variables
CC := $(LINUX86_GCC)
CC_ROOT := $(LINUX86_DIR)
CFLAGS := -g
LINKER_FLAGS := -lstdc++

#Configuro Vars
CONFIG := app_cfg
XDC:=$(XDC_INSTALL_DIR)/xdc
CONFIGURO:= $(XDC_INSTALL_DIR)/xs xdc.tools.configuro
export XDCPATH:=/home/user/rtsc_primer/examples;$(XDCROOT)
TARGET   := gnu.targets.Linux86
PLATFORM := host.platforms.PC

.PHONY:all
all:app.x86U

.PHONY : clean
clean  :
	@rm -rf app.x86U	
	@rm -rf app.o
	@rm -rf $(CONFIG)

#Primary
app.x86U : app.o $(CONFIG)/linker.cmd
	@$(CC) $(CFLAGS) $(LINKER_FLAGS) $^ -o $@
	@echo $@ successfully created

%.o : %.c compiler.opt
	@$(CC) $(CFLAGS) $(shell cat $(CONFIG)/compiler.opt) -c $< -o $@

compiler.opt linker.cmd : $(CONFIG).cfg 
	@$(CONFIGURO) -c $(CC_ROOT) -t $(TARGET) -p $(PLATFORM) -o $(CONFIG) $^
	@echo "Configuro has completed; it's results are in $(CONFIG) "