Ubuntu 11.10, GNU BlowIT, 89C2051, compile done


Ubuntu is one of the Linux distribution, I have learned more pieces of operating skill by these few days.

 

 

“Now I understand, what you tried to say to me……. They would not listen, they did not know how, perhaps they’ll listen now"…
Just feeling like this Vincent & Starry Starry Bight


http://www.youtube.com/watch?v=nkvLq0TYiwI

 

 

 

Source code is freely for download, but just like a rusted iron plate before we could turn it become Swiss knife in shine, at least come to forging and polishing or we will get nothing more than rusted iron as it is.

To compile such a free program also means of no support at all, at least, the original author was appeared to be inactive without further progress since 2008. Only free source code hosting still provide for download, that is one of the problems for free software. ok, I must admit that paid for nokia n900 cell phone, got almost same problem of quality of the service, no significant update because official Maemo development was stopped, this is a really FCUK (always confuse this famous France brand name or crap shit)

ok, problems and solution –
there are peoples who were giving all of their credit & times to help me out on to resolve this issue, of course, we had have not seen each other in reality world at least so far.

before today, I have totally no idea what was speaking by those geeks or programmers with so many [technical terms] in software industry, even not so interested to understand. However, time to goes for dine, must to know where and how to get there, it is need and motivation, to learn something new until I can cook by myself, but not always cooking.

this is work done today, Blowit GNU is compiled and executed running as screen shot below, but some bug existed, no hardware test, anyway, software and building tool chain are ready, easy to goes for self modification to fits our need.

I got this Duke and her/his help, starting to know what is ‘make’ in Linux system,

 

starting to write ‘make’ if I have to compile something, these are inspired me to search & read two more articles, finished the compilation successfully.

 

 
further readings:

Duke and helps
http://www.hkepc.com/forum/viewthread.php?tid=1764820&extra=&page=1

how we can recreate hello_world.tar.gz from scratch, ‘make’ is vital and key to a how to cook
http://www.gnu.org/software/automake/manual/html_node/Creating-amhello.html#Creating-amhello

Maemo development team gave an exact problem description & soltuion
http://maemo.org/maemo_release_documentation/maemo4.1.x/node4.html

GNU BlowIT, 源碼下載的網址
http://sourceforge.net/projects/gbi/
http://gbi.sourceforge.net/

this problem was –
https://xiaolaba.wordpress.com/2012/02/27/ubuntu-11-10-gnu-blowit-89c2051-compile-configure-problem/

this gbigui Blowit source code in plain text and single file
http://gbi.cvs.sourceforge.net/viewvc/gbi/gbi-frozen/g2051.c?content-type=text%2Fplain

 

 

two different version of makefile as followings,

 

 

————————–
# Makefile for gbigui-src-duke.tar.bz2, modified by xiao_laba@yahoo.com.cn, 2012-03-15
# compilation : done and successful
# OS, Ubuntu 11.10

# gbigui-0.1, orginal source code
# http://sourceforge.net/projects/gbi/
# this Makefile, Developed by dukelec
# http://www.hkepc.com/forum/viewthread.php?tid=1764820&extra=&page=2
# source code modified & download-
# http://dukelec.googlecode.com/files/gbigui-with-stupid-makefile.tar.bz2

# reading for problem solving
# http://maemo.org/maemo_release_documentation/maemo4.1.x/node4.html
# The order and placement of the pkg-configs is important:
#    1) the cflags need to be placed as early as feasible,
#    2) but the libs must come last (this does matter in some problematic linking scenarios).
#
# example followings,
# gcc -Wall -g gtk_helloworld-1.c \
#  `pkg-config –cflags gtk+-2.0` -o gtk_helloworld-1  \
#  `pkg-config –libs gtk+-2.0`

CC := gcc

COMPILER_FLAG := -Wall -g -c
COMPILE_FLAG_LIB := `xml2-config –cflags` `pkg-config –cflags gtk+-2.0`
LINK_FLAG_LIB := `xml2-config –libs` `pkg-config –libs gtk+-2.0`
LDLIBS := $(LIBS_grabc) -export-dynamic

all: gbigui

gbigui: main.o callbacks.o close_dialog.o configuration.o confParser.o delete_event.o file_sel_OK.o msg_box.o open_bin.o open_ihx.o sel_file.o setup_p_OK_click.o setup_port.o waitus.o w_exit.o w_write.o
$(CC) $(COMPILE_FLAG_LIB) $(LDLIBS) -o gbigui main.o callbacks.o close_dialog.o configuration.o confParser.o delete_event.o file_sel_OK.o msg_box.o open_bin.o open_ihx.o sel_file.o setup_p_OK_click.o setup_port.o waitus.o w_exit.o w_write.o  $(LINK_FLAG_LIB)
main.o: main.c
$(CC) $(COMPILER_FLAG) main.c $(COMPILE_FLAG_LIB) -o main.o

callbacks.o: callbacks.c
$(CC) $(COMPILER_FLAG) callbacks.c $(COMPILE_FLAG_LIB) -o callbacks.o

close_dialog.o: close_dialog.c
$(CC) $(COMPILER_FLAG) close_dialog.c $(COMPILE_FLAG_LIB) -o close_dialog.o

configuration.o: configuration.c
$(CC) $(COMPILER_FLAG) configuration.c $(COMPILE_FLAG_LIB) -o configuration.o
confParser.o: confParser.c
$(CC) $(COMPILER_FLAG) confParser.c  $(COMPILE_FLAG_LIB) -o confParser.o

delete_event.o: delete_event.c
$(CC) $(COMPILER_FLAG) delete_event.c $(COMPILE_FLAG_LIB) -o delete_event.o

file_sel_OK.o: file_sel_OK.c
$(CC) $(COMPILER_FLAG) file_sel_OK.c $(COMPILE_FLAG_LIB) -o file_sel_OK.o

msg_box.o: msg_box.c
$(CC) $(COMPILER_FLAG) msg_box.c $(COMPILE_FLAG_LIB) -o msg_box.o

open_bin.o: open_bin.c
$(CC) $(COMPILER_FLAG) open_bin.c $(COMPILE_FLAG_LIB) -o open_bin.o

open_ihx.o: open_ihx.c
$(CC) $(COMPILER_FLAG) open_ihx.c $(COMPILE_FLAG_LIB) -o open_ihx.o

sel_file.o: sel_file.c
$(CC) $(COMPILER_FLAG) sel_file.c $(COMPILE_FLAG_LIB) -o sel_file.o

setup_p_OK_click.o: setup_p_OK_click.c
$(CC) $(COMPILER_FLAG) setup_p_OK_click.c $(COMPILE_FLAG_LIB) -o setup_p_OK_click.o

setup_port.o: setup_port.c
$(CC) $(COMPILER_FLAG) setup_port.c $(COMPILE_FLAG_LIB) -o setup_port.o

waitus.o: waitus.c
$(CC) $(COMPILER_FLAG) waitus.c $(COMPILE_FLAG_LIB) -o waitus.o

w_exit.o: w_exit.c
$(CC) $(COMPILER_FLAG) w_exit.c $(COMPILE_FLAG_LIB) -o w_exit.o

w_write.o: w_write.c
$(CC) $(COMPILER_FLAG) w_write.c $(COMPILE_FLAG_LIB) -o w_write.o

clean:
rm -f gbigui *.o
————————–

 

 

 

 

 

————————–
# Makefile for gbigui-src-duke.tar.bz2, modified by xiao_lab@yahoo.com.cn, 2012-03-15
# compilation : done and successful
# OS, Ubuntu 11.10

# gbigui-0.1, orginal source code
# http://sourceforge.net/projects/gbi/
# this Makefile, Developed by dukelec
# http://www.hkepc.com/forum/viewthread.php?tid=1764820&extra=&page=2
# source code modified & download-
# http://dukelec.googlecode.com/files/gbigui-src-duke.tar.bz2

# reading for problem solving
# http://maemo.org/maemo_release_documentation/maemo4.1.x/node4.html
# The order and placement of the pkg-configs is important:
#    1) the cflags need to be placed as early as feasible,
#    2) but the libs must come last (this does matter in some problematic linking scenarios).
#
# example followings,
# gcc -Wall -g gtk_helloworld-1.c \
#  `pkg-config –cflags gtk+-2.0` -o gtk_helloworld-1  \
#  `pkg-config –libs gtk+-2.0`

CC := gcc

SRCS := $(wildcard *.c)
OBJS := $(patsubst %.c,%.o, $(SRCS))

# this Gcc compiler option flags
#CFLAGS := -g `xml2-config –cflags` `pkg-config –cflags gtk+-2.0`
CFLAGS := -Wall -g `xml2-config –cflags` `pkg-config –cflags gtk+-2.0`

# this is libs used for LD linker
LIBS := `xml2-config –libs` `pkg-config –libs gtk+-2.0`

# this is libs flags for LD linker, seems not used
#LDLIBS := $(LIBS_grabc) -export-dynamic

all: main
rm -f *.o *.d

main: $(OBJS)
$(CC) $(CFLAGS) -o blowit $(OBJS) $(LIBS)
#       gcc, cflags first, -o = output name “blowit", OBJ files, last is libs

include $(SRCS:.c=.d)

#@set -e;
%.d : %.c
@rm -f $@; \
#    $(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \
$(CC) -MM $(CFLAGS) $< > $@.$$$$; \
sed ‘s,\($*\)\.o[ :]*,\1.o $@ : ,g’ < $@.$$$$ > $@; \
rm -f $@.$$$$

clean:
rm -f main *.o *.d
————————–

廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s