Re: Make: puzzeling make behaviour ?

B Thomas <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization Road Runner High Speed Online http://www.rr.com
Message-ID <[email protected]>
Hi

I changed the build rule to 

build:  $(PROGRAMS)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o "$<" "$<".c

Shouldn't this work ? However I still have
the same problem.  This make file rule or something
else results in :
gcc -I/home/bt/include   -L/usr/X11R6/lib -lX11 -lGL -lGLU -lm
-L/home/bt/lib -lgltk  Hello_World.c   -o Hello_World

Notice the order of the last two arguments.

Also gcc complains of missing symbols 
which are shown to be present by nm. These
are :

tkInitWindow 
tkQuit
tkExposeFunc
tkReshapeFunc
tkDisplayFunc
tkExec

Output of nm/ar  commands is as follows :

 nm /home/bt/lib/libgltk.a

--------------------------------------------
cursor.o:
00000000 B cursorNum
00000100 C cursors
00000000 T tkNewCursor
         U tkRGBMap
00000230 T tkSetCursor
         U w
         U wRoot
         U XCreatePixmapCursor
         U XCreatePixmapFromBitmapData
         U XDefineCursor
         U xDisplay

event.o:
         U deleteWindowAtom
00000008 B DisplayFunc
00000000 t DoNextEvent
00000004 C drawAllowFlag
         U exit
00000000 B ExposeFunc
0000001c B IdleFunc
0000000c B KeyDownFunc
00000000 D lastEventType
00000010 B MouseDownFunc
00000018 B MouseMoveFunc
00000014 B MouseUpFunc
00000004 B ReshapeFunc
000007b0 T tkDisplayFunc
00000720 T tkExec
00000790 T tkExposeFunc
00000800 T tkIdleFunc
000007c0 T tkKeyDownFunc
000007d0 T tkMouseDownFunc
000007f0 T tkMouseMoveFunc
000007e0 T tkMouseUpFunc
000007a0 T tkReshapeFunc
         U w
         U xDisplay
         U XEventsQueued
         U XLookupString
         U XNextEvent
         U XPeekEvent
         U XPending
         U XRefreshKeyboardMapping
         U XResizeWindow

font.o:
000ee100 D bitmapFont
000a5f80 D filledFont
         U glBegin
         U glBitmap
         U glCallLists
         U glEnd
         U glEndList
         U glListBase
         U glNewList
         U glPixelStorei
         U glPopAttrib
         U glPushAttrib
         U glTranslatef
         U glVertex2f
0005de00 D outlineFont
         U strlen
00000000 D strokeFont
00000420 T tkCreateBitmapFont
000002c0 T tkCreateFilledFont
00000160 T tkCreateOutlineFont
00000000 T tkCreateStrokeFont
000004e0 T tkDrawStr

getset.o:
         U calloc
         U fprintf
         U free
         U glXMakeCurrent
         U stderr
00000000 T tkGetColorMapSize
00000140 T tkGetContext
00000130 T tkGetDisplayMode
00000110 T tkGetDisplayModeID
00000100 T tkGetDisplayModePolicy
00000020 T tkGetMouseLoc
00000080 T tkGetSystem
         U tkInitDisplay
00000150 T tkSetFogRamp
000004b0 T tkSetGreyRamp
00000740 T tkSetOneColor
000008a0 T tkSetOverlayMap
00000a00 T tkSetRGBMap
00000c80 T tkSetWindowLevel
         U w
         U XAllocColorCells
         U xDisplay
         U XQueryPointer
         U xScreen
         U XStoreColor
         U XStoreColors
         U XSync

image.o:
00000040 t ConvertLong
00000000 t ConvertShort
         U fclose
         U fopen
         U fread
         U free
         U fseek
         U fwrite
         U malloc
         U perror
00000330 t RawImageClose
000004d0 t RawImageGetData
00000390 t RawImageGetRow
000000a0 t RawImageOpen
         U stderr
         U tkQuit
000005f0 T tkRGBImageLoad

shapes.o:
         U cos
00000060 d faces.1
00000120 d faces.3
000001e0 d faces.5
000002a0 d faces.7
         U glBegin
         U glEnd
         U glEndList
         U glNewList
         U glNormal3fv
         U glPopMatrix
         U glPushMatrix
         U glRotatef
         U glTranslatef
         U gluCylinder
         U gluNewQuadric
         U gluQuadricDrawStyle
         U gluQuadricNormals
         U gluSphere
         U glVertex3fv
00000000 d n.0
000000c0 d n.2
00000180 d n.4
00000240 d n.6
         U sin
00000630 T tkSolidBox
000015c0 T tkSolidCone
000002a0 T tkSolidCube
00001470 T tkSolidCylinder
00000070 T tkSolidSphere
00000de0 T tkSolidTorus
00000450 T tkWireBox
00001540 T tkWireCone
000000f0 T tkWireCube
000013b0 T tkWireCylinder
00000000 T tkWireSphere
00000810 T tkWireTorus

window.o:
00000040 D colorMaps
         U cursorNum
00000004 C deleteWindowAtom
         U DisplayFunc
         U drawAllowFlag
00000130 t ErrorHandler
         U exit
         U ExposeFunc
00000280 t FindBestMainVisual
00000420 t FindExactMainVisual
000007d0 t FindOverlayVisual
         U fwrite
00000810 t GetMainWindowType
         U glFinish
         U glFlush
         U glXChooseVisual
         U glXCreateContext
         U glXDestroyContext
         U glXGetConfig
         U glXIsDirect
         U glXMakeCurrent
         U glXQueryExtension
         U glXSwapBuffers
         U IdleFunc
         U KeyDownFunc
         U MouseDownFunc
         U MouseMoveFunc
         U MouseUpFunc
         U printf
         U puts
         U ReshapeFunc
         U stderr
00000000 T tkCloseWindow
00000a10 T tkInitDisplay
000001d0 T tkInitDisplayMode
000001f0 T tkInitDisplayModeID
000001e0 T tkInitDisplayModePolicy
00000250 T tkInitPosition
00000ae0 T tkInitWindow
00000fd0 T tkQuit
00000c40 D tkRGBMap
         U tkSetOverlayMap
         U tkSetRGBMap
00000ff0 T tkSwapBuffers
00000000 D w
000009b0 t WaitForMainWindow
000009e0 t WaitForOverlayWindow
00000008 B wRoot
         U XCloseDisplay
         U XCreateColormap
         U XCreateWindow
         U XDestroyWindow
00000000 B xDisplay
         U XFlush
         U XFree
         U XFreeColormap
         U XGetErrorText
         U XGetVisualInfo
         U XIfEvent
         U XInternAtom
         U XMapWindow
         U XOpenDisplay
00000004 B xScreen
         U XSetErrorHandler
         U XSetWMColormapWindows
         U XSetWMProperties
         U XSetWMProtocols
         U XStringListToTextProperty
--------------------------------------

ar t /home/bt/lib/libgltk.a

cursor.o
event.o
font.o
getset.o
image.o
shapes.o
window.o
--------------------------------------
regards
b thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.