Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Makefile for MQseries/C Project

Status
Not open for further replies.

getjbb

MIS
Jun 4, 2003
139
US
Can anyone show me how to create a simple makefile for
a MQSeries/C project which has two c files (GET.c and PUT.c). Of course there will be include files and a couple of .c files with common functions. This is on a 64 bit machine (HP-UX). Also, if you can let me know where to find sampe makefiles for MQSeries application written in C I will appreciate it.

Thanks in advance

getjbb
 
A sample makefile would look like this.

Compile_Flags = -x XXXX -y YYYY -z ZZZZ

Bind_Flags = -a AAAA -b BBBB

.SUFFIXES: .c

.c.o:
@echo compiling $<
<your compiler> $(Compile_Flags) -o $@ $<

BINARIES = amqsput amqsget

all: $BINARIES

$(BINARIES): $(BINARIES).o
@echo linking $@
<your linker> $(Bind_Flags) -o $@ $@.o



This is just a sample and you have to modify this according to your needs. Need to add your compiler and linker. Usually it is CC/C89 and NLD respectively.

Also make sure to change the compile and linker options to whatever you need and whatever they support.

Hope this helps.



Cheers
KK
 
Thanks mqonnet. This will help a lot.

getjbb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top