X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Flib%2FMakefile;h=ffc7f09591dd198b2672c0f2e0854e3cda08e3fc;hb=75f16b43459dfea057766ed29f9ce0b6d696a471;hp=aa69747cd7fe17e29f84895814703076e7043ee3;hpb=440fc2daace32520f9743c57bad81104ed475aa7;p=freeradius.git diff --git a/src/lib/Makefile b/src/lib/Makefile index aa69747..ffc7f09 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -1,66 +1,60 @@ +# +# Makefile +# +# Version: $Id$ +# include ../../Make.inc -SRCS = dict.c print.c radius.c valuepair.c token.c misc.c \ - log.c filters.c missing.c md4.c md5.c sha1.c \ - hmac.c hmacsha1.c \ - snprintf.c isaac.c smbdes.c crypt.c +SRCS = dict.c filters.c hash.c hmac.c hmacsha1.c isaac.c log.c \ + misc.c missing.c md4.c md5.c print.c radius.c rbtree.c \ + sha1.c snprintf.c strlcat.c strlcpy.c token.c udpfromto.c \ + valuepair.c fifo.c packet.c event.c getaddrinfo.c vqp.c \ + heap.c dhcp.c tcp.c soh.c + +LT_OBJS = $(SRCS:.c=.lo) INCLUDES = ../include/radius.h ../include/libradius.h \ - ../include/missing.h ../include/autoconf.h + ../include/missing.h ../include/autoconf.h \ + ../include/ident.h -CFLAGS += -D_LIBRADIUS -I../include +CFLAGS += -D_LIBRADIUS -I$(top_builddir)/src # if you have problems with things that need SHA1-HMAC, this will # dump the key and the input to the hash so you can compare to what # the other end is doing. #CFLAGS += -DHMAC_SHA1_DATA_PROBLEMS -all: static dynamic - -TARGET=$(LIBPREFIX)radius - -STATIC_OBJS = $(SRCS:.c=.o) -DYNAMIC_OBJS = $(SRCS:.c=.lo) - -$(STATIC_OBJS): $(INCLUDES) -$(DYNAMIC_OBJS): $(INCLUDES) +ifeq ($(USE_SHARED_LIBS),yes) +LINK_MODE = -export-dynamic +else +LINK_MODE = -static +endif -####################################################################### -# -# define new rules -# -####################################################################### -%.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ +TARGET = $(LIBPREFIX)freeradius-radius +# Define new rule for libtool objects %.lo : %.c $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< +.PHONY: all clean install reconfig +all: $(TARGET).la -$(TARGET).a: $(STATIC_OBJS) - $(LIBTOOL) --mode=link $(LD) \ - -module -static $(CFLAGS) $^ -o $@ - - -ifneq ($(USE_SHARED_LIBS),yes) -LINK_MODE=-static -endif - -$(TARGET).la: $(DYNAMIC_OBJS) +$(TARGET).la: $(LT_OBJS) $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \ - -module $(LINK_MODE) $(CFLAGS) -o $@ -rpath $(libdir) $^ + $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ -static: $(TARGET).a - -dynamic: $(TARGET).la +$(LT_OBJS): $(INCLUDES) clean: - rm -f *.o *.lo $(TARGET).a $(TARGET).la + rm -f *.o *.lo $(TARGET).la rm -rf .libs -install: static dynamic - $(LIBTOOL) --mode=install $(INSTALL) -c \ - $(TARGET).la $(R)$(libdir)/$(TARGET).la; +install: all + $(INSTALL) -d -m 755 $(R)$(libdir) + $(LIBTOOL) --mode=install $(INSTALL) -c $(TARGET).la \ + $(R)$(libdir)/$(TARGET).la rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la; ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la + +reconfig: