Browsing this Thread:
1 Anonymous Users
|
Re: Wouild this be of any use:?
|
||||
|---|---|---|---|---|
|
Not too shy to talk
![]() |
I'm not sure if the bec.c is being made properly or not.... I'm trying to work out what each bit of the makefile does, but not doing so well
x.x (I know nothing about make files!).On the line that says : $(TARGET): $(OBJECTS) $(XTRAOBJ) I can see "target" is set to "Bec" (the name of the output file?), and that "objects" is set to "ansi.o" (the first file). But I'm not sure about "xtraobj" - it dosen't seem to be defined. The next line that says: $(CC) $(OBJECTS) $(XTRAOBJ) $(LDFLAGS) -o $(TARGET) CC I can see is the gcc compiler (the command that compiles everything?), Objects (ansi.o) but then the "xtraobj" that's empty. I'm guessing "ldflags" has something to do with command line options to gcc (no idea what they do though!). The last lines: %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ Again I see CC is the gcc compiler and "cflags" look like more gcc options. But what is "%.o: %.c, and -c $< -o $@"? :( I'm not sure where bec.c gets compiled either :( I think the biggest problem is my lack of understanding of makefiles and the C language. thanks ljones
Posted on: 2004/11/1 18:58
|
|||
|
||||
|
Anonymous
|
Re: Wouild this be of any use:?
|
|||
|---|---|---|---|---|
|
Quote:
where is the bec.c file!?!?!? (im without a linux box to say exactly how it was supposed to look, but i would guess your makefile is NOT as it should... it is supposed to make ansi.o (the first gcc call) and than link bec.c against ansi.o and the -l(ibs) (the second gcc call) |
||||
|
||||
|
Re: Wouild this be of any use:?
|
||||
|---|---|---|---|---|
|
Not too shy to talk
![]() |
I tried changing the -larosm to -lm and looking at SYS:toosl/debug/sashimi, but they don't give any clues either. Sashimi displayed nothing x.x
(unless I'm not using it right? I run the program in 1 window, and then the other (bec) in another?)I think it's linking ok though (not sure); aaaaa@localhost bec]$ make i386-aros-gcc -s -Wall -O2 -c ansi.c -o ansi.o ansi.c: In function `STRING_Handler': ansi.c:520: warning: `num2' might be used uninitialized in this function i386-aros-gcc ansi.o -lm -o Bec [aaaaa@localhost bec]$ ls -lah total 725K drwxr-xr-x 2 aaaaa aaaaa 424 Nov 19 14:49 ./ drwxr-xr-x 5 aaaaa aaaaa 192 Nov 19 14:29 ../ -rw------- 1 aaaaa aaaaa 63K Oct 22 19:08 ansi.c -rw-r--r-- 1 aaaaa aaaaa 35K Nov 19 14:49 ansi.o -rwxrw-rw- 1 aaaaa aaaaa 383K Nov 19 14:49 Bec* -rw------- 1 aaaaa aaaaa 122K Oct 22 19:08 bec.c -rw-r--r-- 1 aaaaa aaaaa 64K Nov 19 14:21 bec.zip -rw------- 1 aaaaa aaaaa 3.2K Oct 22 19:08 buglist.txt -rw------- 1 aaaaa aaaaa 13K Oct 22 19:08 help.txt -rw------- 1 aaaaa aaaaa 4.3K Oct 22 19:08 keywords.h -rw------- 1 aaaaa aaaaa 200 Oct 22 19:08 m -rw-r--r-- 1 root root 290 Nov 19 14:36 makefile -rw-r--r-- 1 root root 294 Nov 19 14:31 makefile~ -rw------- 1 aaaaa aaaaa 699 Oct 22 19:08 readme.txt -rw-r--r-- 1 aaaaa aaaaa 25 Oct 22 20:13 var.lst -rw------- 1 aaaaa aaaaa 1.2K Oct 22 19:08 whatsnew.txt BTW if anyone wants I can post up the source somewhere, I think the program is ok and is free 'n' stuff. Its just I'm not a developer ![]() thanks :) ljones
Posted on: 2004/11/1 13:06
|
|||
|
||||
|
Anonymous
|
Re: Wouild this be of any use:?
|
|||
|---|---|---|---|---|
|
hum, now i am not the right person for the job, as i am nb myself...but i would try -lm instead of -larosm and would look the console output (or tools/debug/sashimi)...to try to find a hint on what is going on!
but as i say, i dont have the knowledge to help further! sorry! =o\ ***edited*** make sure bec.c is linked with ansi.o....in your output looks like it just build ansi.o as bec, instead of bec.c plus ansi.o as bec! |
||||
|
||||
|
Re: Wouild this be of any use:?
|
||||
|---|---|---|---|---|
|
Not too shy to talk
![]() |
I tried putting the tabs into the makefile - *ah* :) they *both* needed a tab (I thought only one of those lines needed one!) -- ooop!. You know, that's the first time I've even really ever modified a makefile!
:) some good news - Well it almost works. It compiled, and I got this as it compiled: [aaaaa@desktop2 src]$ make i386-aros-gcc -s -Wall -O2 -c ansi.c -o ansi.o ansi.c: In function `STRING_Handler': ansi.c:520: warning: `num2' might be used uninitialized in this function i386-aros-gcc ansi.o -larosm -o Bec [aaaaa@desktop2 src]$ But it *did* give me a compiled file which I tried to run in aros. It didn't give me an error this time - in fact it didn't say anything(!). After running Bec like this; 5. Ram Disk> Bec Nothing happened! (no text printed) It just returned straight back to the command prompt!, i.e. it just did this: 5. Ram Disk> It's nearly working :) only it produces no output! Normally from a linux command line I get some output; BASIC Emulation Compiler v0.20 (c)1998-99 William Yu Usage: BEC infile.ext [outfile] But under the AROS compiled version I don't see this message! (It displays nothing!). thanks ljones
Posted on: 2004/10/31 21:17
|
|||
|
||||
|
Anonymous
|
Re: Wouild this be of any use:?
|
|||
|---|---|---|---|---|
|
hey man...if wall is not ok, try Wall...be creative! =o)
btw:...why you change the makefile that much, the older just needed a tab space, afaik (and Wall instead of wall...) |
||||
|
||||
|
Re: Wouild this be of any use:?
|
||||
|---|---|---|---|---|
|
Not too shy to talk
![]() |
Ok, I tried this;
# Template for a simple generic Makefile # CC = i386-aros-gcc CFLAGS = -s -wall -O2 LDFLAGS = -larosm TARGET = Bec OBJECTS = ansi.o LINKS = ansi.c bec.c all: $(TARGET) $(TARGET): $(OBJECTS) $(XTRAOBJ) $(CC) $(OBJECTS) $(XTRAOBJ) $(LDFLAGS) -o $(TARGET) %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ But this time I get this; [aaaaa@desktop2 src]$ make i386-aros-gcc -s -wall -O2 -c -o ansi.o ansi.c gcc: unrecognized option `-wall' make: *** No rule to make target `i386-aros-gcc', needed by `Bec'. Stop. [aaaaa@desktop2 src]$ What's a "rule"? x.x :) thanks ljones
Posted on: 2004/10/31 12:50
|
|||
|
||||
|
Re: Wouild this be of any use:?
|
||||
|---|---|---|---|---|
|
Home away from home
![]() |
The "$(CC)" lines must have a tabulator space at the beginning of the line. That's what causes missing separator erros.
Posted on: 2004/10/30 20:02
|
|||
|
||||
|
Re: Wouild this be of any use:?
|
||||
|---|---|---|---|---|
|
Not too shy to talk
![]() |
I think it's this line;
$(CC) $(OBJECTS) $(XTRAOBJ) $(LDFLAGS) -o $(TARGET) thanks :) ljones
Posted on: 2004/10/30 12:03
|
|||
|
||||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.






x.x (I know nothing about make files!).