LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-07-2004, 06:14 AM   #1
alix123
Member
 
Registered: Nov 2004
Posts: 63

Rep: Reputation: 15
make file to include libxml into your project


I have a projcet now i want to write a make file so that it can include libxml headers
 
Old 12-07-2004, 07:01 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Code:
gcc `pkg-config --cflags --libs libxml-2.0` foo.c -o foo
 
Old 12-07-2004, 08:10 AM   #3
alix123
Member
 
Registered: Nov 2004
Posts: 63

Original Poster
Rep: Reputation: 15
that is command to compile that file but how to integrate with makefile.in

Quote:
Originally posted by ToniT
Code:
gcc `pkg-config --cflags --libs libxml-2.0` foo.c -o foo

that is gcc compiler command to copile the file which include xml file libarries but
i have a to intgrate with my extin make file

iam giving my make file which includes a file called rfc_tc_output.c for which iam attachin the make file below not i want that make should also compile test.c which contains the function calls to libxml library and also includes the header files of the libxml library ..


#*******this is my exsiting make file which compiles a file called rfc_tc_output **

#now i add another file test.c which has xml call in the same directory whic has the above file
#how to integrate it with this make file so that so that both the files can be build

#makefile.in starts here
thisconfigdir=./..
myfulldir=lib/krb5/rfc_tc_output
mydir=rfc_tc_output
BUILDTOP=$(REL)..$(S)..$(S)..
LOCALINCLUDES = -I $(srcdir)/../asn.1 $(srcdir)/../krb $(srcdir)/../os $(srcdir)/../rfc_tc_krb

##DOS##BUILDTOP = ..\..\..
##DOS##PREFIXDIR=rfc_tc_output
##DOS##OBJFILE=..\$(OUTPRE)rfc_tc_output.lst
##WIN16##LIBNAME=..\krb5.lib

EHDRDIR=$(BUILDTOP)/include/krb5/rfc_tc_output

STLIBOBJS= \
rfc_tc_output.o



SRCS= $(srcdir)/rfc_tc_output.c



OBJS= $(OUTPRE)rfc_tc_output.$(OBJEXT)



##DOS##LIBOBJS = $(OBJS)

all-unix:: all-libobjs

clean-unix:: clean-libobjs

# @libobj_frag@

# +++ Dependency line eater +++
#
# Makefile dependencies follow. This must be the last section in
# the Makefile.in file
#

rfc_tc_output.so rfc_tc_output.po $(OUTPRE)rfc_tc_output.$(OBJEXT): rfc_tc_output.c $(BUILDTOP)/include/krb5.h \
$(SRCTOP)/include/k5-int.h $(BUILDTOP)/include/krb5/osconf.h $(BUILDTOP)/include/krb5/autoconf.h \
$(SRCTOP)/include/k5-platform.h $(BUILDTOP)/include/profile.h \
$(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
$(SRCTOP)/include/krb5/kdb.h




#makefile.in ends here

Last edited by alix123; 12-07-2004 at 08:11 AM.
 
Old 12-10-2004, 05:17 AM   #4
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
You can use definitions like CFLAGS and LDLIBS where to drop those configuration settings.
eg. something like
Code:
CFLAGS=$(shell pkg-config --cflags libxml-2.0)
LDLIBS=$(shell pkg-config --libs libxml-2.0)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar.gz file did not include install file |Spec-ops Linux - Newbie 12 11-17-2005 08:25 AM
Kdevekop: include a Project as a Subproject ? bastl Programming 1 09-09-2005 12:09 PM
Where to include cflags for make? (noob) asd Programming 3 10-16-2003 05:33 PM
PHP Question: how to make include(); depending on URL? linuxfond Programming 7 09-05-2003 09:15 AM
#include file Cynthia Blue Linux - Newbie 6 03-31-2003 06:33 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration