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

« back to all changes in this revision

Viewing changes to src/modules/rlm_sql/drivers/rules.mak

  • 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
1
#######################################################################
2
2
#
3
 
# $Id: rules.mak,v 1.6 2003/06/05 20:16:54 fcusack Exp $
 
3
# $Id: rules.mak,v 1.6.6.2 2006/07/06 16:54:34 aland Exp $
4
4
#
5
5
#  Each module should have a few common defines at the TOP of the
6
6
# Makefile, and the 'include ../rules.mak'
20
20
#
21
21
#######################################################################
22
22
 
23
 
all: dynamic
 
23
.PHONY: all build-module clean distclean install reconfig
 
24
 
 
25
all: build-module
24
26
 
25
27
#######################################################################
26
28
#
31
33
 
32
34
#######################################################################
33
35
#
34
 
# define static and dynamic objects for the libraries,
 
36
# define libtool objects for the libraries,
35
37
# along with a number of other useful definitions.
36
38
#
37
39
#######################################################################
38
 
STATIC_OBJS     = $(SRCS:.c=.o)
39
 
DYNAMIC_OBJS    = $(SRCS:.c=.lo)
40
 
CFLAGS          += -I../.. -I../../../../include
 
40
LT_OBJS         = $(SRCS:.c=.lo)
 
41
CFLAGS          += -I../.. -I$(top_builddir)/src/include
41
42
 
42
43
#######################################################################
43
44
#
46
47
#
47
48
#######################################################################
48
49
SERVER_HEADERS  = ../../rlm_sql.h
49
 
$(STATIC_OBJS):  $(SERVER_HEADERS)
50
 
$(DYNAMIC_OBJS): $(SERVER_HEADERS)
 
50
$(LT_OBJS):  $(SERVER_HEADERS)
51
51
 
52
52
#######################################################################
53
53
#
54
54
# define new rules
55
55
#
56
56
#######################################################################
57
 
%.o : %.c
58
 
        $(CC) $(CFLAGS) $(RLM_SQL_CFLAGS) -c $< -o $@
59
 
 
60
 
%.lo : %.c
 
57
%.lo: %.c
61
58
        $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(RLM_SQL_CFLAGS) -c $<
62
59
 
63
60
ifneq ($(TARGET),)
66
63
# Define a number of new targets
67
64
#
68
65
#######################################################################
69
 
$(TARGET).a: $(STATIC_OBJS)
70
 
        $(LIBTOOL) --mode=link $(LD) -module -static $(CFLAGS) $(RLM_SQL_CFLAGS) $^ -o $@ 
71
66
 
72
67
#
73
68
#  If the module is in the list of static modules, then the "dynamic"
90
85
LINK_MODE=-static
91
86
endif
92
87
 
93
 
$(TARGET).la: $(DYNAMIC_OBJS)
94
 
        $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
95
 
        -module $(LINK_MODE) $(CFLAGS) \
96
 
        $(RLM_SQL_CFLAGS) -o $@ -rpath $(libdir) $^ $(RLM_SQL_LIBS)
97
 
 
98
88
#######################################################################
99
89
#
100
90
#  Generic targets so we can sweep through all modules
104
94
# a level, to the 'src/modules' directory, for general consumption.
105
95
#
106
96
#######################################################################
107
 
static: $(TARGET).a
 
97
build-module: $(TARGET).la
 
98
        @[ -d .libs ] && cp .libs/* ../lib
108
99
        @cp $< ../lib
109
100
 
110
 
dynamic: $(TARGET).la
111
 
        @cp $< ../lib
 
101
$(TARGET).la: $(LT_OBJS)
 
102
        $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
 
103
        -module $(LINK_MODE) $(LDFLAGS) $(RLM_SQL_LDFLAGS) -o $@ \
 
104
        -rpath $(libdir) $^ $(RLM_SQL_LIBS)
112
105
 
113
106
#######################################################################
114
107
#
116
109
#
117
110
#######################################################################
118
111
else
119
 
static:
120
 
 
121
 
dynamic:
 
112
build-module:
122
113
 
123
114
# if $(TARGET) == ""
124
115
endif
137
128
        @rm -f config.h config.mak
138
129
 
139
130
reconfig:
140
 
        @[ "x$(AUTOCONF)" != "x" ] && [ -f ./configure.in ] && $(AUTOCONF) -l $(RLM_DIR)../../..
 
131
        @if [ -f configure.in ]; then \
 
132
                [ "x$(AUTOCONF)" != "x" ] && $(AUTOCONF) -I $(top_builddir); \
 
133
        fi
 
134
        @if [ -f config.h.in ]; then \
 
135
                [ "x$(AUTOHEADER)" != "x" ] && $(AUTOHEADER); \
 
136
        fi
141
137
 
142
138
#
143
139
#  Do any module-specific installation.