File tree Expand file tree Collapse file tree 5 files changed +50
-5
lines changed Expand file tree Collapse file tree 5 files changed +50
-5
lines changed Original file line number Diff line number Diff line change 1
1
* .swp
2
2
.DS_Store
3
3
* .o
4
+ * .a
4
5
* .la
5
6
* .so
6
7
* .lo
Original file line number Diff line number Diff line change 2
2
# $Id$
3
3
#
4
4
5
+ noinst_LIBRARIES = libgateway.a
6
+
5
7
bin_PROGRAMS = wifidog \
6
8
wdctl
7
9
@@ -11,9 +13,11 @@ AM_CPPFLAGS = \
11
13
-Wall \
12
14
-Wextra \
13
15
-Wno-unused-parameter
14
- wifidog_LDADD = $(top_builddir ) /libhttpd/libhttpd.la
16
+ wifidog_LDADD = libgateway.a $(top_builddir ) /libhttpd/libhttpd.la
17
+
18
+ wifidog_SOURCES = main.c
15
19
16
- wifidog_SOURCES = commandline.c \
20
+ libgateway_a_SOURCES = commandline.c \
17
21
conf.c \
18
22
debug.c \
19
23
fw_iptables.c \
@@ -51,4 +55,6 @@ noinst_HEADERS = commandline.h \
51
55
simple_http.h \
52
56
pstring.h
53
57
58
+ wdctl_LDADD = libgateway.a
59
+
54
60
wdctl_SOURCES = wdctl.c
Original file line number Diff line number Diff line change 19
19
* *
20
20
\********************************************************************/
21
21
22
- /* $Id$ */
23
22
/** @internal
24
23
@file gateway.c
25
24
@brief Main loop
@@ -483,7 +482,7 @@ main_loop(void)
483
482
484
483
/** Reads the configuration file and then starts the main loop */
485
484
int
486
- main (int argc , char * * argv )
485
+ gw_main (int argc , char * * argv )
487
486
{
488
487
489
488
s_config * config = config_get_config ();
Original file line number Diff line number Diff line change 28
28
#ifndef _GATEWAY_H_
29
29
#define _GATEWAY_H_
30
30
31
+ #include <stdio.h>
32
+
31
33
#include "httpd.h"
32
34
33
35
extern time_t started_time ;
34
36
35
- /* The internal web server */
37
+ /** @brief The internal web server */
36
38
extern httpd * webserver ;
37
39
40
+ /** @brief actual program entry point. */
41
+ int gw_main (int , char * * );
42
+
38
43
/** @brief exits cleanly and clear the firewall rules. */
39
44
void termination_handler (int s );
40
45
Original file line number Diff line number Diff line change
1
+ /* vim: set et sw=4 ts=4 sts=4 : */
2
+ /********************************************************************\
3
+ * This program is free software; you can redistribute it and/or *
4
+ * modify it under the terms of the GNU General Public License as *
5
+ * published by the Free:Software Foundation; either version 2 of *
6
+ * the License, or (at your option) any later version. *
7
+ * *
8
+ * This program is distributed in the hope that it will be useful, *
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
11
+ * GNU General Public License for more details. *
12
+ * *
13
+ * You should have received a copy of the GNU General Public License*
14
+ * along with this program; if not, contact: *
15
+ * *
16
+ * Free Software Foundation Voice: +1-617-542-5942 *
17
+ * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
18
+ * Boston, MA 02111-1307, USA [email protected] *
19
+ * *
20
+ \********************************************************************/
21
+
22
+ /** @internal
23
+ @file main.c
24
+ @brief Entry point only
25
+ @author Copyright (C) 2015 Alexandre Carmel-Veilleux <[email protected] >
26
+ */
27
+
28
+ #include "gateway.h"
29
+
30
+ int
31
+ main (int argc , char * * argv )
32
+ {
33
+ return gw_main (argc , argv );
34
+ }
You can’t perform that action at this time.
0 commit comments