rpjanaka 0 Junior Poster in Training

I am using an open source library called IGI_UDP for measure the available bandwidth of a link ([EMAIL="http://www.cs.cmu.edu/%7Ehnn/igi/"]http://www.cs.cmu.edu/%7Ehnn/igi/[/EMAIL]).
with that library they have provided a "Makefile" which is not an auto generated one.

the following is the given Makefile,

*****************************************************************
CC = gcc
INCS = -I.
CFLAGS = -g -Wall $(DEFS) $(INCS)

# for linux
DEFS = -DLINUX -DRETSIGTYPE=void -DHAVE_SIGACTION=1
LIBS = -lpthread


CLIOBJS = nbs_setsignal.o nbs_client.o nbs_client_test.o
SRVOBJS = nbs_setsignal.o nbs_server.o

.c.o:
@rm -f $@
$(CC) $(CFLAGS) -c $*.c

all: igi_server igi_client

igi_client: $(CLIOBJS)
@rm -f $@
$(CC) $(CFLAGS) -o $@ $(CLIOBJS) $(LIBS)

igi_server: $(SRVOBJS)
@rm -f $@
$(CC) $(CFLAGS) -o $@ $(SRVOBJS) $(LIBS)

clean:
rm -f *.o igi_client igi_server
*****************************************************************


But now I want to generate this Makefile through the automake tool (for using with my application)
So that I created the following Makefile.am file


*****************************************************************
CC = gcc
INCS = -I.


# for linux
DEFS = -DLINUX -DRETSIGTYPE=void -DHAVE_SIGACTION=1
LIBS = -lpthread


bin_PROGRAMS = igi_server igi_client


igi_server_SOURCES = nbs_server.c nbs_setsignal.c
igi_server_LDADD = $(LIBS)
igi_server_CFLAGS = -g -Wall $(DEFS) $(INCS)


igi_client_SOURCES = nbs_setsignal.c nbs_client.c nbs_client_test.c
igi_client_LDADD = $(LIBS)
igi_client_CFLAGS = -g -Wall $(DEFS) $(INCS)
*****************************************************************

By using this Makefile.am, I can just compile the sources and create the executables. But the problem is those compiled code does not give the expected result (it is highly differ form when it is used the previous Makefile)

It is obvious that the problem is with my Makefile.am file, (I guess that required macro has not been used)
So please can anyone help me to create the proper Makefile.am file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.