On 11 May, 2006, at 21:00, Parikshat Dubey wrote:
LIBS = -lz \
-lpthread \
-ldirectfb \
-lfusion \
-ldirect \
-ldl \
-lfbclient \
-lm \
-g \
-lpam \
-llibs
OBJS = NM.o \
File.o \
Queue.o
NM.o:NM.c File.h Queue.h header.h
$(CC) -c NM.c $(CFLAGS) $(INCLUDE) $(LIBS)
File.o:File.c File.h
$(CC) -c File.c $(CFLAGS) $(INCLUDE) $(LIBS)
Queue.o:Queue.c Queue.h header.h
$(CC) -c Queue.c $(CFLAGS) $(INCLUDE) $(LIBS)
#all:nodemanager
nodemanager:$(OBJS)
$(LD) $(LDFLAGS) $(CFLAGS) $(OBJS) $(INCLUDE) $(LIBS) -o nodemanager
clean:rm *.o nodemanager
i am getting the following errors:
/usr/sfw/bin/g++ -c NM.c -I/usr/local/include/directfb -I/usr/
local/include/direct-internal -I/usr/include -I../include -I/usr/
sfw/lib/ -lz -lpthread -ldirectfb -lfusion -ldirect -ldl -lfbclient
-lm -g -lpam -llibs
g++: -lz: linker input file unused because linking not done
g++: -lpthread: linker input file unused because linking not done
g++: -ldirectfb: linker input file unused because linking not done
g++: -lfusion: linker input file unused because linking not done
g++: -ldirect: linker input file unused because linking not done
g++: -ldl: linker input file unused because linking not done
g++: -lfbclient: linker input file unused because linking not done
g++: -lm: linker input file unused because linking not done
g++: -lpam: linker input file unused because linking not done
g++: -llibs: linker input file unused because linking not done
Take the $(LIBS) out of these lines:
NM.o:NM.c File.h Queue.h header.h
$(CC) -c NM.c $(CFLAGS) $(INCLUDE) $(LIBS)
File.o:File.c File.h
$(CC) -c File.c $(CFLAGS) $(INCLUDE) $(LIBS)
Queue.o:Queue.c Queue.h header.h
$(CC) -c Queue.c $(CFLAGS) $(INCLUDE) $(LIBS)