Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
6da52010
Commit
6da52010
authored
Feb 13, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'makefile'
parents
2307eac6
b36ae194
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
17 deletions
+35
-17
CHANGELOG
CHANGELOG
+6
-0
Makefile
Makefile
+29
-17
No files found.
CHANGELOG
View file @
6da52010
...
@@ -45,6 +45,12 @@ version 2.60
...
@@ -45,6 +45,12 @@ version 2.60
round-robin to multiple servers, in the same way as
round-robin to multiple servers, in the same way as
--dhcp-boot. A good suggestion from Cristiano Cumer.
--dhcp-boot. A good suggestion from Cristiano Cumer.
Support BUILD_DIR variable in the Makefile. Allows
builds from multiple architectures in the same tree with eg
make BUILD_DIR=linux
If BUILD_DIR is not set, compilation happens in the src
directory, as before. Suggestion from Mark Mitchell.
version 2.59
version 2.59
Fix regression in 2.58 which caused failure to start up
Fix regression in 2.58 which caused failure to start up
...
...
Makefile
View file @
6da52010
...
@@ -18,14 +18,16 @@ BINDIR = ${PREFIX}/sbin
...
@@ -18,14 +18,16 @@ BINDIR = ${PREFIX}/sbin
MANDIR
=
${PREFIX}
/share/man
MANDIR
=
${PREFIX}
/share/man
LOCALEDIR
=
${PREFIX}
/share/locale
LOCALEDIR
=
${PREFIX}
/share/locale
BUILD_DIR
=
$(SRC)
CFLAGS
=
-Wall
-W
-O2
PKG_CONFIG
=
pkg-config
PKG_CONFIG
=
pkg-config
INSTALL
=
install
INSTALL
=
install
MSGMERGE
=
msgmerge
MSGMERGE
=
msgmerge
MSGFMT
=
msgfmt
MSGFMT
=
msgfmt
XGETTEXT
=
xgettext
XGETTEXT
=
xgettext
CFLAGS
=
-Wall
-W
-O2
#################################################################
#################################################################
SRC
=
src
SRC
=
src
...
@@ -47,58 +49,68 @@ OBJS = cache.o rfc1035.o util.o option.o forward.o network.o \
...
@@ -47,58 +49,68 @@ OBJS = cache.o rfc1035.o util.o option.o forward.o network.o \
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o
\
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o
\
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o dhcp-common.o
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o dhcp-common.o
all
:
HDRS
=
dnsmasq.h config.h dhcp_protocol.h dhcp6_protocol.h dns_protocol.h
@
cd
$(SRC)
&&
$(MAKE)
\
all
:
$(BUILD_DIR)
@
cd
$(BUILD_DIR)
&&
$(MAKE)
\
BUILD_CFLAGS
=
"
$(VERSION)
$(DBUS_CFLAGS)
$(IDN_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS)
"
\
BUILD_CFLAGS
=
"
$(VERSION)
$(DBUS_CFLAGS)
$(IDN_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS)
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(IDN_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS)
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(IDN_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS)
"
\
-f
../Makefile dnsmasq
-f
../Makefile dnsmasq
clean
:
clean
:
rm
-f
*
~
$(
SRC)
/
*
.mo contrib/
*
/
*
~
*
/
*
~
$(SRC
)
/
*
.pot
rm
-f
*
~
$(
BUILD_DIR)
/
*
.mo contrib/
*
/
*
~
*
/
*
~
$(BUILD_DIR
)
/
*
.pot
rm
-f
$(
SRC)
/
*
.o
$(SRC)
/dnsmasq.a
$(SRC
)
/dnsmasq core
*
/core
rm
-f
$(
BUILD_DIR)
/
*
.o
$(BUILD_DIR)
/dnsmasq.a
$(BUILD_DIR
)
/dnsmasq core
*
/core
install
:
all install-common
install
:
all install-common
install-common
:
install-common
:
$(INSTALL)
-d
$(DESTDIR)$(BINDIR)
-d
$(DESTDIR)$(MANDIR)
/man8
$(INSTALL)
-d
$(DESTDIR)$(BINDIR)
-d
$(DESTDIR)$(MANDIR)
/man8
$(INSTALL)
-m
644
$(MAN)
/dnsmasq.8
$(DESTDIR)$(MANDIR)
/man8
$(INSTALL)
-m
644
$(MAN)
/dnsmasq.8
$(DESTDIR)$(MANDIR)
/man8
$(INSTALL)
-m
755
$(
SRC
)
/dnsmasq
$(DESTDIR)$(BINDIR)
$(INSTALL)
-m
755
$(
BUILD_DIR
)
/dnsmasq
$(DESTDIR)$(BINDIR)
all-i18n
:
all-i18n
:
$(BUILD_DIR)
@
cd
$(
SRC
)
&&
$(MAKE)
\
@
cd
$(
BUILD_DIR
)
&&
$(MAKE)
\
I18N
=
-DLOCALEDIR
=
\'\"
$(LOCALEDIR)
\"\'
\
I18N
=
-DLOCALEDIR
=
\'\"
$(LOCALEDIR)
\"\'
\
BUILD_CFLAGS
=
"
$(VERSION)
$(DBUS_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS)
`
$(PKG_CONFIG)
--cflags
libidn
`
"
\
BUILD_CFLAGS
=
"
$(VERSION)
$(DBUS_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS)
`
$(PKG_CONFIG)
--cflags
libidn
`
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS)
`
$(PKG_CONFIG)
--libs
libidn
`
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS)
`
$(PKG_CONFIG)
--libs
libidn
`
"
\
-f
../Makefile dnsmasq
-f
../Makefile dnsmasq
@
cd
$(PO)
;
for
f
in
*
.po
;
do
\
@
cd
$(PO)
;
for
f
in
*
.po
;
do
\
cd
../
$(
SRC
)
&&
$(MAKE)
\
cd
../
$(
BUILD_DIR
)
&&
$(MAKE)
\
-f
../Makefile
$
${f%.po}
.mo
;
\
-f
../Makefile
$
${f%.po}
.mo
;
\
done
done
install-i18n
:
all-i18n install-common
install-i18n
:
all-i18n install-common
cd
$(
SRC
)
;
../bld/install-mo
$(DESTDIR)$(LOCALEDIR)
$(INSTALL)
cd
$(
BUILD_DIR
)
;
../bld/install-mo
$(DESTDIR)$(LOCALEDIR)
$(INSTALL)
cd
$(MAN)
;
../bld/install-man
$(DESTDIR)$(MANDIR)
$(INSTALL)
cd
$(MAN)
;
../bld/install-man
$(DESTDIR)$(MANDIR)
$(INSTALL)
merge
:
merge
:
$(BUILD_DIR)
@
cd
$(
SRC
)
&&
$(MAKE)
-f
../Makefile dnsmasq.pot
@
cd
$(
BUILD_DIR
)
&&
$(MAKE)
-f
../Makefile dnsmasq.pot
@
cd
$(PO)
;
for
f
in
*
.po
;
do
\
@
cd
$(PO)
;
for
f
in
*
.po
;
do
\
echo
-n
msgmerge
$$
f
&&
$(MSGMERGE)
--no-wrap
-U
$$
f ../
$(
SRC
)
/dnsmasq.pot
;
\
echo
-n
msgmerge
$$
f
&&
$(MSGMERGE)
--no-wrap
-U
$$
f ../
$(
BUILD_DIR
)
/dnsmasq.pot
;
\
done
done
$(BUILD_DIR)
:
mkdir
$(BUILD_DIR)
# rules below are targets in recusive makes with cwd=$(SRC)
# rules below are targets in recusive makes with cwd=$(SRC)
.c.o
:
$(OBJS
:
.o=.c) $(HDRS):
$(CC)
$(CFLAGS)
$(COPTS)
$(I18N)
$(BUILD_CFLAGS)
$(RPM_OPT_FLAGS)
-c
$<
ln
-s
../
$(SRC)
/
$@
.
%.o
:
%.c $(HDRS)
$(CC)
$(CFLAGS)
$(COPTS)
$(I18N)
$(BUILD_CFLAGS)
$(RPM_OPT_FLAGS)
-c
$*
.c
dnsmasq
:
$(OBJS)
dnsmasq
:
$(OBJS)
$(CC)
$(LDFLAGS)
-o
$@
$(OBJS)
$(BUILD_LIBS)
$(LIBS)
$(CC)
$(LDFLAGS)
-o
$@
$(OBJS)
$(BUILD_LIBS)
$(LIBS)
dnsmasq.pot
:
$(OBJS:.o=.c)
dnsmasq.h config.h
dnsmasq.pot
:
$(OBJS:.o=.c)
$(HDRS)
$(XGETTEXT)
-d
dnsmasq
--foreign-user
--omit-header
--keyword
=
_
-o
$@
-i
$(OBJS:.o=.c)
$(XGETTEXT)
-d
dnsmasq
--foreign-user
--omit-header
--keyword
=
_
-o
$@
-i
$(OBJS:.o=.c)
%.mo
:
../po/%.po dnsmasq.pot
%.mo
:
../po/%.po dnsmasq.pot
$(MSGMERGE)
-o
- ../po/
$*
.po dnsmasq.pot |
$(MSGFMT)
-o
$*
.mo -
$(MSGMERGE)
-o
- ../po/
$*
.po dnsmasq.pot |
$(MSGFMT)
-o
$*
.mo -
.PHONY
:
all clean install install-common all-i18n install-i18n merge
.PHONY
:
all clean install install-common all-i18n install-i18n merge
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment