Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bin file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
usanet21
n00b
n00b


Joined: 20 Feb 2003
Posts: 24

PostPosted: Thu Feb 27, 2003 6:36 am    Post subject: Bin file Reply with quote

hi does anyone knows what a .bin file is in Linux?

Also, does any one noes how to write a C makefile in Linux?

Ok, lets say i have 1 main make file, and now i want to use the main makefile to call other makefiles to compile all my codes. How do i go about doing it?

Any help would be greatly appreciated.
Back to top
View user's profile Send private message
cram
Guru
Guru


Joined: 17 Nov 2002
Posts: 312
Location: Saskatoon, Canada

PostPosted: Thu Feb 27, 2003 6:49 am    Post subject: Reply with quote

a .bin file is simply a binary executable

a good place to start looking for makefile info might be here
_________________
aaarggghhhh.
Good point Chewie.
Back to top
View user's profile Send private message
usanet21
n00b
n00b


Joined: 20 Feb 2003
Posts: 24

PostPosted: Fri Feb 28, 2003 4:43 pm    Post subject: make file Reply with quote

does anyone here knows how to write a simple high level make file in C language...i read some documentation but its quite complicating..
i just want a simple one...
The problem is like this: I am using GLADE in Linux to create an interface. I want this interface to be able to connect to a serial connection like minicom. The GLADE generate C codes and makefile, and the minicom also has makefile and C codes..so my ques is: how to write another make file to link and compile the minicom and the GLADE C codes???????

any help would be appreciated........thanks
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Fri Feb 28, 2003 4:58 pm    Post subject: Reply with quote

Code:
# info make
seems like a reasonable starting point.
Otherwise, pretty much every existing source package out there uses multiple
makefiles (one per directory, very often). So why not unpack one or two
source tarballs and look around?
The kernel toplevel makefile, for instance, does things like this:
Code:

target:
         $(MAKE) -C some/other/directory othertagert

which is kind of equivalend to (cd some/other/directory && make othertarget)
Back to top
View user's profile Send private message
usanet21
n00b
n00b


Joined: 20 Feb 2003
Posts: 24

PostPosted: Fri Feb 28, 2003 5:24 pm    Post subject: help me Reply with quote

hi, can u help me out??
how should i start to create a make file, i am really very very new to linux and C lang..i dont know what tarball and all the stuff..
where should i write the make file ?? and how should i start???
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Fri Feb 28, 2003 5:37 pm    Post subject: Reply with quote

If you're new to linux and C, a makefile probably isn't the good place to start anyway.
Look for an online C tutorial (Google helps).Once you've
got a hold of how C works (you don't need to be an expert, just get a hang ofit), go visit the link cram posted to see how you can start building software. You'll learn about makefiles in the process.
Then look for more online docs. And when you have specific questions, go to forums/IRC/whatever.
Back to top
View user's profile Send private message
usanet21
n00b
n00b


Joined: 20 Feb 2003
Posts: 24

PostPosted: Fri Feb 28, 2003 5:46 pm    Post subject: sad Reply with quote

sad lah..i have to learn all these thing in a short while, cause i am doing a project right now and i have to hand up soon..wats ur email??
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Fri Feb 28, 2003 5:50 pm    Post subject: Reply with quote

I won't do your homework for you :D

Try and explain what you need to do, and where you're stuck at.
You wont learn anything if you don't have to think about it and do some investigation yourself.
Back to top
View user's profile Send private message
usanet21
n00b
n00b


Joined: 20 Feb 2003
Posts: 24

PostPosted: Fri Feb 28, 2003 5:58 pm    Post subject: please Reply with quote

i am doing soem research work now ok..just that i dont how to start, i am writing a very simple make file, but on the net it is very complicated. i cant find info so i come herE
!
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Fri Feb 28, 2003 6:16 pm    Post subject: Reply with quote

Ok. Here's a really sample makefile:
Code:

# Default target
all: build_one build_two

# First thins to do
build_one:
(tab) $(CC) hello.c -o hello

# Second thing to do
build_two:
(tab) $(MAKE) -C otherdirectory


If you save that to a file called Makefile (with a capital M), and run 'make', it will:
1. Try to compile a file called hello.c in the same directory into an executable called hello
2. If the first step worked, it will then call "make" in a directory called 'otherdirectory'
If that other directory contains a Makefile, it will run through it.
(Replace the (tab) by a real tab caracter, of course)

HTH
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum