Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new list user: I have a problem with a makefile



Comrades,

If this belongs on another forum, let me know.

We are building a C++/Java system. It consists of a Codewarrior/ Powerplant app, a Java jar, and a DLL that links with the JavaVM framework. It is running on OSX. The PP app talks to the jar via sockets, and both the PP app and the jar make calls into the DLL. The DLL's makefile is the problem. It worked with Panther, but it fails under Tiger. I am the new guy on the project, and need to get it working with Tiger for our next version.

I would like to migrate the makefile into an Xcode project for maintainablity, so if someone knows how to do that, swell. Our next version will do away with the Codewarrior entirely.


Here is (something like) the makefile, which worked with Panther:

# makefile >>>

TARGET=../libJEngine.jnilib

OBJECTS=\
    engine/mathx.o\
    engine/auto.o\

$(TARGET): $(OBJECTS)
libtool -dynamic -M -single_module -o $@ $^ -lstdc++ -lc -lgcc > map
strip -x $@


%.o: %.cpp
cc -c -O2 -o $@ $^ -I /System/Library/Frameworks/ JavaVM.framework/Headers


clean:
    rm -f $(TARGET) *.o engine/*.o map

# << end makefile


When I try make (in the Terminal), I get (something like) this:
$ make
libtool -dynamic -M -single_module -o ../libJEngine.jnilib engine/ mathx.o engine/auto.o -lstdc++ -lc -lgcc > map
libtool: can't locate file for: -lstdc++
libtool: file: -lstdc++ is not an object file (not allowed in a library)
libtool: can't locate file for: -lgcc
libtool: file: -lgcc is not an object file (not allowed in a library)
make: *** [../libJEngine.jnilib] Error 1
$



Does anyone know what I can do here? I am going to need to add more files to this project, and be able to maintain it into the future, but I am no expert on makefiles. I would like to do it all in xcode if possible, but can't figure out just what the original makefile does.





I fear for my Country when I reflect that God is Just. -- Thomas Jefferson

Paul Archibald








_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.