bimai rodrigue
Registered
Hi to all of you,
first of all my english is not that good but i hope i can express myself so that everybody can understand me.
I'm trying to compile a code using a makefile. This has been implemented for Unix platform and now i am trying to run it on Mac OS X(Tiger). My makefile looks like this:
SHELL=/bin/bash
PREFIX=/usr/local
.PHONY : all
all : fnf.tgt
fnf.tgt : fnf.c ivl_target.h
gcc -Wall -O2 -shared -o fnf.tgt fnf.c
.PHONY : install
install : all
install fnf.tgt $(PREFIX)/lib/ivl/fnf.tgt
install fnf.conf $(PREFIX)/lib/ivl/fnf.conf
.PHONY : uninstall
uninstall :
-rm $(PREFIX)/lib/ivl/fnf.tgt
-rm $(PREFIX)/lib/ivl/fnf.conf
clean:
-rm fnf.tgt
The first error is :
powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
and then:
/usr/bin/ld: Undefined symbols:
_main
_ivl_const_bits
_ivl_const_pin
_ivl_const_pins
etc ...
_ivl_signal_port
collect2: ld returned 1 exit status
make: *** [fnf.tgt] Error 1
The real problem occurs in the line : gcc .... fnf.c
This line must generate a file(image) named fnf.tgt.
Has anybody idea how i can fix the problem?
Thanx
first of all my english is not that good but i hope i can express myself so that everybody can understand me.
I'm trying to compile a code using a makefile. This has been implemented for Unix platform and now i am trying to run it on Mac OS X(Tiger). My makefile looks like this:
SHELL=/bin/bash
PREFIX=/usr/local
.PHONY : all
all : fnf.tgt
fnf.tgt : fnf.c ivl_target.h
gcc -Wall -O2 -shared -o fnf.tgt fnf.c
.PHONY : install
install : all
install fnf.tgt $(PREFIX)/lib/ivl/fnf.tgt
install fnf.conf $(PREFIX)/lib/ivl/fnf.conf
.PHONY : uninstall
uninstall :
-rm $(PREFIX)/lib/ivl/fnf.tgt
-rm $(PREFIX)/lib/ivl/fnf.conf
clean:
-rm fnf.tgt
The first error is :
powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
and then:
/usr/bin/ld: Undefined symbols:
_main
_ivl_const_bits
_ivl_const_pin
_ivl_const_pins
etc ...
_ivl_signal_port
collect2: ld returned 1 exit status
make: *** [fnf.tgt] Error 1
The real problem occurs in the line : gcc .... fnf.c
This line must generate a file(image) named fnf.tgt.
Has anybody idea how i can fix the problem?
Thanx