~ubuntu-branches/ubuntu/feisty/freeradius/feisty-security

« back to all changes in this revision

Viewing changes to src/lib/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-12-16 20:45:11 UTC
  • mfrom: (3.1.10 feisty)
  • Revision ID: james.westby@ubuntu.com-20061216204511-3pbbsu4s8jtehsor
Tags: 1.1.3-3
Fix POSIX compliance problem in init script.  Closes: #403384. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Makefile
 
3
#
 
4
# Version:      $Id: Makefile,v 1.20.4.6 2006/04/12 20:45:20 aland Exp $
 
5
#
1
6
 
2
7
include ../../Make.inc
3
8
 
4
 
SRCS            = dict.c print.c radius.c valuepair.c token.c misc.c \
5
 
                log.c filters.c missing.c md4.c md5.c sha1.c \
6
 
                hmac.c hmacsha1.c snprintf.c isaac.c crypt.c \
7
 
                udpfromto.c rbtree.c
 
9
SRCS            = crypt.c dict.c filters.c hash.c hmac.c hmacsha1.c \
 
10
                  isaac.c log.c misc.c missing.c md4.c md5.c print.c \
 
11
                  radius.c rbtree.c sha1.c snprintf.c token.c udpfromto.c \
 
12
                  valuepair.c
 
13
 
 
14
LT_OBJS         = $(SRCS:.c=.lo)
8
15
 
9
16
INCLUDES        = ../include/radius.h ../include/libradius.h \
10
17
                  ../include/missing.h ../include/autoconf.h
11
18
 
12
 
CFLAGS          += -D_LIBRADIUS -I../include 
 
19
CFLAGS          += -D_LIBRADIUS -I../include
13
20
 
14
21
# if you have problems with things that need SHA1-HMAC, this will
15
22
# dump the key and the input to the hash so you can compare to what
16
23
# the other end is doing.
17
 
CFLAGS += -DHMAC_SHA1_DATA_PROBLEMS
18
 
 
19
 
all:    static dynamic
20
 
 
21
 
TARGET=$(LIBPREFIX)radius
22
 
 
23
 
STATIC_OBJS     = $(SRCS:.c=.o)
24
 
DYNAMIC_OBJS    = $(SRCS:.c=.lo)
25
 
 
26
 
$(STATIC_OBJS):  $(INCLUDES)
27
 
$(DYNAMIC_OBJS): $(INCLUDES)
28
 
 
29
 
#######################################################################
30
 
#
31
 
# define new rules
32
 
#
33
 
#######################################################################
34
 
%.o : %.c
35
 
        $(CC) $(CFLAGS) -c $< -o $@
36
 
 
 
24
#CFLAGS += -DHMAC_SHA1_DATA_PROBLEMS
 
25
 
 
26
ifeq ($(USE_SHARED_LIBS),yes)
 
27
LINK_MODE       = -export-dynamic
 
28
else
 
29
LINK_MODE       = -static
 
30
endif
 
31
 
 
32
TARGET          = $(LIBPREFIX)radius
 
33
 
 
34
# Define new rule for libtool objects
37
35
%.lo : %.c
38
36
        $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
39
37
 
40
 
 
41
 
$(TARGET).a: $(STATIC_OBJS)
42
 
        $(LIBTOOL) --mode=link $(LD) \
43
 
        -module -static $(CFLAGS) $^ -o $@ 
44
 
 
45
 
 
46
 
ifneq ($(USE_SHARED_LIBS),yes)
47
 
LINK_MODE=-static
48
 
endif
49
 
 
50
 
$(TARGET).la: $(DYNAMIC_OBJS)
 
38
all: $(TARGET).la
 
39
 
 
40
$(TARGET).la: $(LT_OBJS)
51
41
        $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
52
 
        -module $(LINK_MODE) $(CFLAGS) -o $@ -rpath $(libdir) $^ 
53
 
 
54
 
static: $(TARGET).a
55
 
 
56
 
dynamic: $(TARGET).la
 
42
        $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ $(LCRYPT)
 
43
 
 
44
$(LT_OBJS): $(INCLUDES)
57
45
 
58
46
clean:
59
 
        rm -f *.o *.lo $(TARGET).a $(TARGET).la
 
47
        rm -f *.o *.lo $(TARGET).la
60
48
        rm -rf .libs
61
49
 
62
 
install: static dynamic
63
 
        $(LIBTOOL) --mode=install $(INSTALL) -c \
64
 
                $(TARGET).la $(R)$(libdir)/$(TARGET).la;
 
50
install: all
 
51
        $(INSTALL) -d -m 755    $(R)$(libdir)
 
52
        $(LIBTOOL) --mode=install $(INSTALL) -c $(TARGET).la \
 
53
                $(R)$(libdir)/$(TARGET).la
65
54
        rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la;
66
55
        ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la