View previous topic :: View next topic |
Author |
Message |
usanet21 n00b
Joined: 20 Feb 2003 Posts: 24
|
Posted: Thu Feb 27, 2003 6:36 am Post subject: Bin file |
|
|
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 |
|
|
cram Guru
Joined: 17 Nov 2002 Posts: 312 Location: Saskatoon, Canada
|
Posted: Thu Feb 27, 2003 6:49 am Post subject: |
|
|
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 |
|
|
usanet21 n00b
Joined: 20 Feb 2003 Posts: 24
|
Posted: Fri Feb 28, 2003 4:43 pm Post subject: make file |
|
|
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 |
|
|
avendesora Veteran
Joined: 16 Aug 2002 Posts: 1739 Location: Betelgeuse vicinity
|
Posted: Fri Feb 28, 2003 4:58 pm Post subject: |
|
|
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 |
|
|
usanet21 n00b
Joined: 20 Feb 2003 Posts: 24
|
Posted: Fri Feb 28, 2003 5:24 pm Post subject: help me |
|
|
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 |
|
|
avendesora Veteran
Joined: 16 Aug 2002 Posts: 1739 Location: Betelgeuse vicinity
|
Posted: Fri Feb 28, 2003 5:37 pm Post subject: |
|
|
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 |
|
|
usanet21 n00b
Joined: 20 Feb 2003 Posts: 24
|
Posted: Fri Feb 28, 2003 5:46 pm Post subject: sad |
|
|
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 |
|
|
avendesora Veteran
Joined: 16 Aug 2002 Posts: 1739 Location: Betelgeuse vicinity
|
Posted: Fri Feb 28, 2003 5:50 pm Post subject: |
|
|
I won't do your homework for you
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 |
|
|
usanet21 n00b
Joined: 20 Feb 2003 Posts: 24
|
Posted: Fri Feb 28, 2003 5:58 pm Post subject: please |
|
|
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 |
|
|
avendesora Veteran
Joined: 16 Aug 2002 Posts: 1739 Location: Betelgeuse vicinity
|
Posted: Fri Feb 28, 2003 6:16 pm Post subject: |
|
|
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 |
|
|
|