Duncan Gibson wrote:

> 
>> Well, by now things become even more rediculous. The single line
>> Albrecht suggested works. But doing it with make in two steps
>> doesn't. The -t option to ld doesn't make any differnce, but shows
>> that ld seems to ignore libfltk.a because it doesn't appear in the
>> output.
> 
>> > make
>> g++ -I/usr/local/include -I/usr/include/freetype2 -I/usr/X11R6/include
>> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
>> -D_THREAD_SAFE -D_REENTRANT   -c -o hello.o hello.cpp
> 
> Not sure exactly why you would have both -c and -o in the same line
> here, or what the result would be...
> 
> I have just taken fltk-1.3.x/test/hello.cxx and compiled it with
> a Makefile tweaked from that supplied by Greg in STR #2149. Does
> the following Makefile work for you? Don't forget to replace "TAB "
> with a real TAB character.
> 
> Cheers
> Duncan
> 
> CXX      = $(shell fltk-config --cxx)
> DEBUG    = -g
> CXXFLAGS = $(shell fltk-config --use-gl --use-images --cxxflags ) -I.
> LDFLAGS  = $(shell fltk-config --use-gl --use-images --ldflags )
> LDSTATIC = $(shell fltk-config --use-gl --use-images --ldstaticflags )
> LINK     = $(CXX)
> 
> TARGET = hello
> OBJS = hello.o
> SRCS = hello.cxx
> 
> .SUFFIXES: .o .cxx
> %.o: %.cxx
> TAB $(CXX) $(CXXFLAGS) $(DEBUG) -c $<
> 
> all: $(TARGET)
> TAB $(LINK) -o $(TARGET) $(OBJS) $(LDSTATIC)
> 
> $(TARGET): $(OBJS)
> hello.o: hello.cxx
> 
> clean: $(TARGET) $(OBJS)
> TAB rm -f *.o 2> /dev/null
> TAB rm -f $(TARGET) 2> /dev/null

Hi Duncan,

it's the same effect as before, which does't surprise, because the
$(shell...) expressions evaluate to same, I put litterarly in my makefile.

Thanks anyway, Dieter


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to