[Asterisk-Dev] Makefile problems

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Oct 6 22:24:55 MST 2005


On Fri, Oct 07, 2005 at 12:09:34AM -0500, Kristian Kielhofner wrote:
> Hello everyone,
> 
> 	Lines 309-312 of asterisk Makefile:
> 
> ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
>   OBJS+= dhfcn.o
>   ASTCFLAGS+=-DDLFCNCOMPAT
> endif
> 
> 
> 	Check for the presence of /usr/include/dlfcn.h.  If it exists, add 
> 	an object called dhfcn.o and some extra CFLAGS.  (Just trying to give you 
> my interpretation to make sure it's accurate).
> 
> 	This is all well and good, except that if your system keeps dlfcn.h 
> 	in /include/ (or anywhere but /usr/include), asterisk will fail because the 
> Makefiles evidently don't know how to make an object called dhfcn.o:

Look in those as well. 

# using $(for) this could probably be made shorter:
dhfcn_inc:=$(first $(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h $(CROSS_COMPILE_TARGET)/include/dlfcn.h ))
ifneq ($(dhfcn_inc),)
  CFLAGS+=-I# how do I trim?
  OBJS+=dhfcn.o
endif

Or add it always (if it is required anyway).

> 
> ter  -DPOLLCOMPAT -DDLFCNCOMPAT   -c -o poll.o poll.c
> make: *** No rule to make target `dhfcn.o', needed by `asterisk'.  Stop.
> Running make failed. Please check this.
> 
> 	As you can see, it has done exactly what it should: defined 
> 	DLFCNCOMPAT and added an object named dhfcn.o - there just isn't one!
> 
> What's up?
> 
> --
> Kristian Kielhofner
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
> 

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-dev mailing list