simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Simulavr-devel] Emergency Makefile and config.h for manual configuratio


From: Klaus Rudolph
Subject: [Simulavr-devel] Emergency Makefile and config.h for manual configuration
Date: Sun, 19 Dec 2004 22:11:09 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040114

Ups, forgot the attatchments :-)

----


Hi Knut,

attatched you will find a Makefile and also a config.h file. The
config.h file must be
changed for your personal needs. You have to enter the path to your
local avr installation (binutils for avr).
Please copy the Makefile and config.h to ./src and try make there.

You have to include the config.h file in
avrdevice.cpp:#include "config.h"
main.cpp:#include "config.h"

if this is not in the official sourcefiles.

Hope this helps.

If not I will send you my local workarea which definitly works on my
linux host. :-)


Klaus


#include the global configuration file
include config.h
# attention: if -DPROF is also defined here the simulation breaks
# after 1000000 steps!!!! Dont wonder about that again :-)
#PROF=-pg
#PROF=-pg -DPROF
#PROF=
#CXX=/opt/linux/bin/g++
#CC=/opt/linux/bin/gcc

#CFLAGS= -g -Wall $(PROF) -O3 -funroll-loops -fstrict-aliasing 
-fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 
-falign-jumps-max-skip=15 -falign-loops-max-skip=15 -fomit-frame-pointer 
-foptimize-sibling-calls -finline-all-stringops -funit-at-a-time 
-funswitch-loops -ffast-math -march=i686 -mtune=pentium3 -I$(BFD)/bfd
CFLAGS= -g -Wall $(PROF) -O2 -mtune=pentium3 -I$(BFD)/bfd
#CFLAGS= -g -Wall $(PROF) -O2 -mcpu=pentium3 -I$(BFD)/bfd
CXXFLAGS = $(CFLAGS) 


OBJECTS= serialtx.o serialrx.o main3.o main.o decoder.o decoder_trace.o 
gdbserver.o avrmalloc.o avrerror.o rwmem.o hardware.o hwstack.o hweeprom.o 
avrdevice.o irqsystem.o hwtimer.o ui.o hwwado.o hwuart.o hwspi.o hwextirq.o 
hwtimer01irq.o hwsreg.o flash.o atmega128.o at8515.o hwmegatimer.o 
hwmegatimer0123irq.o helper.o systemclock.o at8515special.o lcd.o keyboard.o 
trace.o hwmegaextirq.o mysocket.o memory.o at4433.o hwacomp.o pin.o net.o 
hwport.o pinatport.o ioregs.o hwad.o scope.o printable.o application.o

TCL_OBJECTS= serialtx.o serialrx.o main3.o main.o decoder.o decoder_trace.o 
gdbserver.o avrmalloc.o avrerror.o rwmem.o hardware.o hwstack.o hweeprom.o 
avrdevice.o irqsystem.o hwtimer.o ui.o hwwado.o hwuart.o hwspi.o hwextirq.o 
hwtimer01irq.o hwsreg.o flash.o atmega128.o at8515.o hwmegatimer.o 
hwmegatimer0123irq.o helper.o systemclock.o at8515special.o simulavr_wrap.o 
lcd.o keyboard.o trace.o hwmegaextirq.o mysocket.o memory.o at4433.o hwacomp.o 
pin.o net.o hwport.o pinatport.o ioregs.o hwad.o scope.o printable.o 
application.o

TCLHEADER= serialtx.h serialrx.h avrdevice.h at8515.h atmega128.h 
at8515special.h at4433.h systemclock.h ui.h hardware.h pin.h net.h trace.h 
gdb.h lcd.h 




simulavr: $(OBJECTS) 
        $(CXX) $(CFLAGS) $(OBJECTS)  $(BFD)/bfd/libbfd.a 
$(BFD)/libiberty/libiberty.a -lncurses -lc -lm -o  simulavr 

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)



# compile and generate dependency info;
# will also become command-less, prereq-less targets
#   sed:    strip the target (everything before colon)
#   sed:    remove any continuation backslashes
#   fmt -1: list words one per line
#   sed:    strip leading spaces
#   sed:    add trailing colons


%.o: %.c
        $(CC) -c $(CFLAGS) $*.c -o $*.o
        $(CC) -MM $(CFLAGS) $*.c > $*.d
        @mv -f $*.d $*.d.tmp
        @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
        @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
        sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
        @rm -f $*.d.tmp
        

%.o: %.cpp
        $(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o
        $(CXX) -MM $(CXXFLAGS) $*.cpp > $*.d
        @mv -f $*.d $*.d.tmp
        @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
        @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
        sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
        @rm -f $*.d.tmp

#special targets for ui-keyboard 
keytrans.h: keynumber_to_scancode.dat xcode_to_keynumber.dat kbdgentables
        kbdgentables

kbdgentables: kbdgentables.cpp
        $(CXX) $(CXXFLAGS) kbdgentables.cpp -o kbdgentables 

keyboard.o: keytrans.h




clean:
        rm -f *.o simulavr simulavr.so *.bin *.srec *.oo *.om *binm *wrap.c 
*wrap.cxx *.so tags *.o.go *_out dump *.d
        rm -f keytrans.h kbdgentables 
        rm -f gmon.out
        rm -f *.gch
        rm -f *.Plo
        rm -rf .deps
        rm -rf .libs
        

simulavr_wrap.cxx: simulavr.i $(TCLHEADER)
        swig -c++ simulavr.i

simulavr_wrap.o: simulavr_wrap.cxx
        $(CXX) $(CXXFLAGS) simulavr_wrap.cxx -c

simulavr.so: $(TCL_OBJECTS)
        $(CXX) $(CXXFLAGS) $(TCL_OBJECTS) -ltcl$(TCL_VERSION) 
$(BFD)/bfd/libbfd.a $(BFD)/libiberty/libiberty.a -lc -lm -lncurses -shared -o 
simulavr.so


#define ZUHAUSE

#define PRG_WISH "/usr/bin/wish"
#ifndef ZUHAUSE
#define BFD_H "/home/rudolphk/avrdownload/binutils-2.14_avr/bfd/bfd.h"
#else
#define BFD_H "/home/zfrdh/avrdownload/binutils-2.14_avr/bfd/bfd.h"
#endif
#define VERSION "0.0000001 local version "

#ifdef __DO_NOT_USE_FROM_C_CODE

#if swig is available 
all: simulavr simulavr.so
#else  swig is not availabe
#all: simulavr 
#endif

#if ccache is available
CXX=ccache g++
#else
# CXX= g++
#endif

#some systems have no libtcl.so, they use libtcl8.4 instead so please set 
TCL_VERSION
#it is allowed to leave TCL_VERSION
TCL_VERSION=8.4 
#TCL_VERSION=

#ifndef ZUHAUSE
#BFD= /home/rudolphk/avrdownload/binutils-2.14_avr
#else
BFD= /home/zfrdh/avrdownload/binutils-2.14_avr
#endif
#endif

reply via email to

[Prev in Thread] Current Thread [Next in Thread]