Update of /cvsroot/rtk/rtk/ide/symbian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15614 Added Files: E32Dll.cpp E32Main.cpp Makefile.librtk Makefile.string0 README makeinc-common makeinc-epoc makeinc-test_core Log Message: Files needed for symbian build --- NEW FILE: E32Dll.cpp --- #include <e32base.h> GLDEF_C TInt E32Dll(TDllReason) { return(KErrNone); } --- NEW FILE: E32Main.cpp --- #include <e32base.h> int main(int argc, char * argv[]); EXPORT_C TInt E32Main(); GLDEF_C TInt E32Main() { char*argv[] = { "me" }; CTrapCleanup* cleanup = CTrapCleanup::New(); TRAPD(error, main(1, argv)); delete cleanup; return 0; } --- NEW FILE: Makefile.librtk --- include makeinc-epoc NAME = $(NAMERTK) TYPE=a OBJECTS= \ ../../src/core/SList.o \ ../../src/core/Dict.o \ ../../src/core/rchar.o \ ../../src/core/Vector.o \ ../../src/core/Variant.o \ ../../src/core/String.o \ ../../src/core/Array.o \ ../../src/core/platform/epoc32/lfind.o \ ../../src/core/debug.o \ ../../src/core/error.o \ UID1 = 10000079 UID2 = 100039ce UID3 = 10123456 CFLAGS += -I../../src/core include makeinc-common --- NEW FILE: Makefile.string0 --- TEST_NAME=string0 include makeinc-test_core --- NEW FILE: README --- Hi! First of all you need to set up a symbian sdk on linux. For this you need to install the windows sdk. Obtain the binaries makesis, bmconv, petran and rcomp from gnupoc site: http://gnupoc.sf.net From the same site download also the gcc cross compiler. The rest I used from another linux port of the sdk, the link is here: http://www.ki-ag.de/pages/tech/SymbianSDK/symbian_sdk_6.1_on_linux.html Of course some changes were needed, mostly because now we have nativ linux versions of the needed binaries (like petran) Anyway, I do not remember all the steps I did, but here are some notes: - prepare a directory fot epoc root (mine is /opt/space/s60) - start installing the sdk2unix package as it is described in the howto in the epoc root dir - install the gcc in that directory (of course not with full path, so the directory bin will be <epocroot>/bin, etc.) - copy the binaries of petran, etc to <epocroot>/bin I hope that's it. I try to do some better docs Pali --- NEW FILE: makeinc-common --- ############################################################################### # These have to be defined (I will also give some examples) # EPOC=/opt/space/s60 # NAME=hello # TYPE=exe # UID2=00000000 # UID3=00000000 # OBJECTS=hello.o # LIBS=estlib.lib ############################################################################### # App independent part # ARCH = arm-epoc-pe CC = $(ARCH)-gcc LD = $(ARCH)-ld CXX = $(ARCH)-g++ AR = $(ARCH)-ar DT = $(ARCH)-dlltool PT = petran EPOCTRGREL=$(EPOC)/Release/armi/urel CFLAGS += -fomit-frame-pointer -O -march=armv4t -mthumb-interwork -pipe \ -nostdinc -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas \ -DNDEBUG -D_UNICODE -D__SYMBIAN32__ -D__GCC32__ -D__EPOC32__ \ -D__MARM__ -D__MARM_ARMI__ -Dmain=MAIN \ -I$(EPOC)/include -I$(EPOC)/include/libc LIBS += $(EPOCTRGREL)/euser.lib TARGET=$(NAME).$(TYPE) ifeq ($(TYPE), app) UID1 = 10000079 LDFLAGS += -s -e _E32DLL -u _E32Dll --dll EX = $(EPOCTRGREL)/edll.lib CFLAGS += -D__DLL__ EXPCMD = OBJECTS += E32Dll.o endif ifeq ($(TYPE), dll) UID1 = 10000079 LDFLAGS += -s -e _E32DLL -u _E32Dll --dll EX = $(EPOCTRGREL)/edll.lib CFLAGS += -D__DLL__ EXPCMD = OBJECTS += E32Dll.o TOCLEAN = $(NAME).lib $(NAME).def3 endif ifeq ($(TYPE), exe) UID1 = 1000007a LDFLAGS += -s -e _E32Startup -u _E32Startup EX = $(EPOCTRGREL)/eexe.lib EXPCMD = OBJECTS += E32Main.o endif .SUFFIXES: .cpp .c .o all : $(TARGET) -include $(TARGET).deps SRC = $(OBJECTS:.o=.cpp) $(TARGET).deps : $(SRC) $(CC) -M $(CFLAGS) $(SRC) > $@ .cpp.o : @echo Compiling $< ... $(CC) $(CFLAGS) -c -o $@ $< $(NAME).def2 : $(OBJECTS) $(DT) -m arm_interwork --output-def $(NAME).def1 $(OBJECTS) perl -p -e 's,\n,\r\n,;s,; \(null\),NONAME,' $(NAME).def1 > $(NAME).def2 ############################################################################## # EXE part ifeq ($(TYPE), exe) $(NAME).bas $(NAME).ex1 : $(NAME).def2 $(LD) $(LDFLAGS) --base-file $(NAME).bas -o $(NAME).ex1 $(EX) $(OBJECTS) $(LIBS) $(NAME).exp : $(NAME).bas $(DT) -m arm_interwork \ --def $(NAME).def2 \ --dllname "$(NAME)[$(UID3)].$(TYPE)" \ --base-file $(NAME).bas \ --output-exp $(NAME).exp endif ############################################################################## # DLL part ifeq ($(TYPE), dll) $(NAME).bas : $(NAME).def2 $(DT) -m arm_interwork \ --def $(NAME).def2 \ --output-exp $(NAME).exp \ --dllname "$(NAME)[$(UID3)].$(TYPE)" $(LD) $(LDFLAGS) $(NAME).exp --base-file $(NAME).bas -o $(NAME).ex1 \ $(EX) $(OBJECTS) $(LIBS) $(NAME).exp : $(NAME).bas $(DT) -m arm_interwork \ --def $(NAME).def2 \ --output-exp $(NAME).exp \ --dllname "$(NAME)[$(UID3)].$(TYPE)" \ --base-file $(NAME).bas endif ############################################################################## # Static Lib part ifeq ($(TYPE), a) $(NAME).a : $(OBJECTS) $(AR) cr $@ $(OBJECTS) endif $(NAME).ex2 : $(NAME).exp $(LD) $(LDFLAGS) $< -o $@ $(EX) $(OBJECTS) $(LIBS) $(NAME).dll : $(NAME).lib $(NAME).dll $(NAME).exe $(NAME).app : $(NAME).ex2 $(PT) $< $@ -nocall -uid1 0x$(UID1) -uid2 0x$(UID2) -uid3 0x$(UID3) rm -f $(NAME).ex2 $(NAME).ex1 $(NAME).def1 $(NAME).def2 $(NAME).bas $(NAME).exp $(NAME).lib : $(NAME).def2 $(DT) -m arm_interwork \ --output-lib $(NAME).lib \ --def $(NAME).def2 \ --dllname "$(NAME)[$(UID3)].$(TYPE)" clean : rm -f $(OBJECTS) $(TARGET).deps $(TARGET) $(TARGET).map $(TOCLEAN) for i in def1 def2 ex1 ex2 bas exp; do rm -f $(NAME).$$i; done --- NEW FILE: makeinc-epoc --- EPOC=/opt/space/s60 PATH=$(EPOC)/bin:$(EPOC)/arm-epoc-pe/bin:/bin:/usr/bin:/usr/local/bin CFLAGS += -I../.. UNICODE=0 ifeq ($(UNICODE), 1) NAMERTK=librtk_u CFLAGS += -DUNICODE -D_UNICODE else NAMERTK=librtk endif --- NEW FILE: makeinc-test_core --- include makeinc-epoc NAME=test_core_$(TEST_NAME) TYPE=exe UID2=100039ce UID3=101faaff OBJECTS=../../test/core/$(TEST_NAME).o LIBS=$(NAMERTK).a $(EPOCTRGREL)/estlib.lib include makeinc-common $(OBJECTS) : $(NAMERTK).a $(NAMERTK).a : make -f Makefile.librtk |