how to compile from source code??

Programming, for all ages and all languages.
Post Reply
shrikant
Posts: 9
Joined: Sat May 03, 2008 3:05 pm

how to compile from source code??

Post by shrikant »

can i know the methods to compile an operating system from its source code??

how do make file runs?
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Look at the README file.
shrikant
Posts: 9
Joined: Sat May 03, 2008 3:05 pm

Post by shrikant »

if it doesnot contain the readme file then....??? :x
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Well, the build system used by each OS will be different... :roll:

How are we supposed to know how to compile it without knowing what it is you want compiling?
shrikant
Posts: 9
Joined: Sat May 03, 2008 3:05 pm

Post by shrikant »

ya u r right sir......but their must be a basic method.
suppose i hv written the codes bt dnt knw how to compile n run.thn what i hv to do?
iammisc
Member
Member
Posts: 269
Joined: Thu Nov 09, 2006 6:23 pm

Post by iammisc »

If you're going to ask a question can you stop using abbrvtns :!: :roll:

Anyway, let me get this straight: you wrote an operating system but don't know how to compile it. If so, then you should really spend more time learning your programming language inside out rather than diving into os dev which is really advanced.
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Post by JackScott »

General method for compiling pretty much everything:

Code: Select all

./configure (can be optional)
make
make install
If that doesn't work, you're going to have to be more specific with what you are compiling.
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

I don't think many hobby OSes will have an install target. Some also require you to run a configuration utility first, Linux and my OS need you do do make menuconfig/config/etc. to create a config file.

shrikant: If you've written code and don't know how to even compile it, I suggest you learn more about the language you are using and the basics of software development before even attempting to try OS dev.
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Post by JackScott »

In my makefile, I have a target redirection (not sure what the proper name is, dependency maybe) from make-image to install, just so it's UNIX-like. I don't have a ./configure, but I do have am inc/config.h.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

The reason I didn't mention the standard autoconf/automake compile commands is that AFAIK most operating systems don't use autoconf, as (a) it is horrible and (b) was designed for compiling hosted apps, and levering it around to compile an OS is not an easy task (Been there, done that!)
HJED
Member
Member
Posts: 61
Joined: Tue Sep 04, 2007 4:18 am
Location: the world wide web
Contact:

Post by HJED »

if it your code get a compiler and compile and link the code like you would normally do for any radome program.

if its somebody elses code ask them or browses the site you got the code from.
.................................. um what should i put here .............................?..........................................
..... :D................
Post Reply