[DEV] compile in C++
This commit is contained in:
parent
e979a643de
commit
8ba04a5048
@ -63,7 +63,7 @@ buffer_append (struct buffer_t *buffer, const char *str)
|
|||||||
if (len >= buffer->capacity)
|
if (len >= buffer->capacity)
|
||||||
{
|
{
|
||||||
buffer->capacity = MAX (len + 1, 2 * buffer->capacity);
|
buffer->capacity = MAX (len + 1, 2 * buffer->capacity);
|
||||||
buffer->buf = realloc (buffer->buf, buffer->capacity);
|
buffer->buf = (char*)realloc (buffer->buf, buffer->capacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat (buffer->buf, str);
|
strcat (buffer->buf, str);
|
@ -22,6 +22,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <upnp/upnp.h>
|
#include <upnp/upnp.h>
|
||||||
#include <upnp/upnptools.h>
|
#include <upnp/upnptools.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "ushare.h"
|
#include "ushare.h"
|
||||||
#include "services.h"
|
#include "services.h"
|
||||||
@ -271,7 +273,7 @@ didl_add_value (struct buffer_t *out, char *param, off_t value)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
didl_add_item (struct buffer_t *out, int item_id,
|
didl_add_item (struct buffer_t *out, int item_id,
|
||||||
int parent_id, char *restricted, char *class, char *title,
|
int parent_id, char *restricted, char *classPointer, char *title,
|
||||||
char *protocol_info, off_t size, char *url, char *filter)
|
char *protocol_info, off_t size, char *url, char *filter)
|
||||||
{
|
{
|
||||||
buffer_appendf (out, "<%s", DIDL_ITEM);
|
buffer_appendf (out, "<%s", DIDL_ITEM);
|
||||||
@ -280,7 +282,7 @@ didl_add_item (struct buffer_t *out, int item_id,
|
|||||||
didl_add_param (out, DIDL_ITEM_RESTRICTED, restricted);
|
didl_add_param (out, DIDL_ITEM_RESTRICTED, restricted);
|
||||||
buffer_append (out, ">");
|
buffer_append (out, ">");
|
||||||
|
|
||||||
didl_add_tag (out, DIDL_ITEM_CLASS, class);
|
didl_add_tag (out, DIDL_ITEM_CLASS, classPointer);
|
||||||
didl_add_tag (out, DIDL_ITEM_TITLE, title);
|
didl_add_tag (out, DIDL_ITEM_TITLE, title);
|
||||||
|
|
||||||
if (filter_has_val (filter, DIDL_RES))
|
if (filter_has_val (filter, DIDL_RES))
|
||||||
@ -305,7 +307,7 @@ didl_add_item (struct buffer_t *out, int item_id,
|
|||||||
static void
|
static void
|
||||||
didl_add_container (struct buffer_t *out, int id, int parent_id,
|
didl_add_container (struct buffer_t *out, int id, int parent_id,
|
||||||
int child_count, char *restricted, char *searchable,
|
int child_count, char *restricted, char *searchable,
|
||||||
char *title, char *class)
|
char *title, char *classPointer)
|
||||||
{
|
{
|
||||||
buffer_appendf (out, "<%s", DIDL_CONTAINER);
|
buffer_appendf (out, "<%s", DIDL_CONTAINER);
|
||||||
|
|
||||||
@ -317,7 +319,7 @@ didl_add_container (struct buffer_t *out, int id, int parent_id,
|
|||||||
didl_add_param (out, DIDL_CONTAINER_SEARCH, searchable);
|
didl_add_param (out, DIDL_CONTAINER_SEARCH, searchable);
|
||||||
buffer_append (out, ">");
|
buffer_append (out, ">");
|
||||||
|
|
||||||
didl_add_tag (out, DIDL_CONTAINER_CLASS, class);
|
didl_add_tag (out, DIDL_CONTAINER_CLASS, classPointer);
|
||||||
didl_add_tag (out, DIDL_CONTAINER_TITLE, title);
|
didl_add_tag (out, DIDL_CONTAINER_TITLE, title);
|
||||||
|
|
||||||
buffer_appendf (out, "</%s>", DIDL_CONTAINER);
|
buffer_appendf (out, "</%s>", DIDL_CONTAINER);
|
@ -22,6 +22,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <upnp/upnp.h>
|
#include <upnp/upnp.h>
|
||||||
#include <upnp/upnptools.h>
|
#include <upnp/upnptools.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "ushare.h"
|
#include "ushare.h"
|
||||||
#include "services.h"
|
#include "services.h"
|
||||||
@ -84,7 +86,6 @@
|
|||||||
static bool
|
static bool
|
||||||
cms_get_protocol_info (struct action_event_t *event)
|
cms_get_protocol_info (struct action_event_t *event)
|
||||||
{
|
{
|
||||||
extern struct mime_type_t MIME_Type_List[];
|
|
||||||
struct mime_type_t *list;
|
struct mime_type_t *list;
|
||||||
char *respText = NULL, *respPtr;
|
char *respText = NULL, *respPtr;
|
||||||
size_t respLen = 0, len;
|
size_t respLen = 0, len;
|
||||||
@ -142,7 +143,6 @@ cms_get_current_connection_ids (struct action_event_t *event)
|
|||||||
static bool
|
static bool
|
||||||
cms_get_current_connection_info (struct action_event_t *event)
|
cms_get_current_connection_info (struct action_event_t *event)
|
||||||
{
|
{
|
||||||
extern struct mime_type_t MIME_Type_List[];
|
|
||||||
struct mime_type_t *list = MIME_Type_List;
|
struct mime_type_t *list = MIME_Type_List;
|
||||||
|
|
||||||
if (!event)
|
if (!event)
|
@ -291,7 +291,7 @@ ctrl_telnet_thread (void *a __attribute__ ((unused)))
|
|||||||
socklen_t sl_addr;
|
socklen_t sl_addr;
|
||||||
|
|
||||||
/* Create client object */
|
/* Create client object */
|
||||||
client = malloc (sizeof (ctrl_telnet_client));
|
client = (ctrl_telnet_client *)malloc (sizeof (ctrl_telnet_client));
|
||||||
|
|
||||||
if (!client)
|
if (!client)
|
||||||
{
|
{
|
||||||
@ -628,7 +628,7 @@ ctrl_telnet_register (const char *funcname,
|
|||||||
{
|
{
|
||||||
telnet_function_list *function;
|
telnet_function_list *function;
|
||||||
|
|
||||||
function = malloc (sizeof (telnet_function_list));
|
function = (telnet_function_list *)malloc (sizeof (telnet_function_list));
|
||||||
function->name = strdup (funcname); /* Mayby use strndup...? */
|
function->name = strdup (funcname); /* Mayby use strndup...? */
|
||||||
function->description = description ? strdup (description) : NULL;
|
function->description = description ? strdup (description) : NULL;
|
||||||
function->function = funcptr;
|
function->function = funcptr;
|
||||||
@ -689,7 +689,7 @@ ctrl_telnet_tokenize (char *raw, int *argc, char ***argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Create argv */
|
/* Create argv */
|
||||||
*argv = malloc (sizeof (char **) * ((*argc) + 1));
|
*argv = (char **)malloc (sizeof (char **) * ((*argc) + 1));
|
||||||
|
|
||||||
/* (2/3) Parse throu one more time, this time filling argv (Pass 2 / 3) */
|
/* (2/3) Parse throu one more time, this time filling argv (Pass 2 / 3) */
|
||||||
i = 0;
|
i = 0;
|
@ -27,6 +27,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <upnp/upnp.h>
|
#include <upnp/upnp.h>
|
||||||
#include <upnp/upnptools.h>
|
#include <upnp/upnptools.h>
|
||||||
@ -187,10 +189,10 @@ get_file_memory (const char *fullpath, const char *description,
|
|||||||
{
|
{
|
||||||
struct web_file_t *file;
|
struct web_file_t *file;
|
||||||
|
|
||||||
file = malloc (sizeof (struct web_file_t));
|
file = (struct web_file_t *)malloc (sizeof (struct web_file_t));
|
||||||
file->fullpath = strdup (fullpath);
|
file->fullpath = strdup (fullpath);
|
||||||
file->pos = 0;
|
file->pos = 0;
|
||||||
file->type = FILE_MEMORY;
|
file->type = web_file_t::FILE_MEMORY;
|
||||||
file->detail.memory.contents = strdup (description);
|
file->detail.memory.contents = strdup (description);
|
||||||
file->detail.memory.len = length;
|
file->detail.memory.len = length;
|
||||||
|
|
||||||
@ -241,10 +243,10 @@ http_open (const char *filename, enum UpnpOpenFileMode mode)
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
file = malloc (sizeof (struct web_file_t));
|
file = (struct web_file_t *)malloc (sizeof (struct web_file_t));
|
||||||
file->fullpath = strdup (entry->fullpath);
|
file->fullpath = strdup (entry->fullpath);
|
||||||
file->pos = 0;
|
file->pos = 0;
|
||||||
file->type = FILE_LOCAL;
|
file->type = web_file_t::FILE_LOCAL;
|
||||||
file->detail.local.entry = entry;
|
file->detail.local.entry = entry;
|
||||||
file->detail.local.fd = fd;
|
file->detail.local.fd = fd;
|
||||||
|
|
||||||
@ -264,11 +266,11 @@ http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
|
|||||||
|
|
||||||
switch (file->type)
|
switch (file->type)
|
||||||
{
|
{
|
||||||
case FILE_LOCAL:
|
case web_file_t::FILE_LOCAL:
|
||||||
log_verbose ("Read local file.\n");
|
log_verbose ("Read local file.\n");
|
||||||
len = read (file->detail.local.fd, buf, buflen);
|
len = read (file->detail.local.fd, buf, buflen);
|
||||||
break;
|
break;
|
||||||
case FILE_MEMORY:
|
case web_file_t::FILE_MEMORY:
|
||||||
log_verbose ("Read file from memory.\n");
|
log_verbose ("Read file from memory.\n");
|
||||||
len = (size_t) MIN (buflen, file->detail.memory.len - file->pos);
|
len = (size_t) MIN (buflen, file->detail.memory.len - file->pos);
|
||||||
memcpy (buf, file->detail.memory.contents + file->pos, (size_t) len);
|
memcpy (buf, file->detail.memory.contents + file->pos, (size_t) len);
|
||||||
@ -323,7 +325,7 @@ http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
|
|||||||
log_verbose ("Attempting to seek by %lld from end (was at %lld) in %s\n",
|
log_verbose ("Attempting to seek by %lld from end (was at %lld) in %s\n",
|
||||||
offset, file->pos, file->fullpath);
|
offset, file->pos, file->fullpath);
|
||||||
|
|
||||||
if (file->type == FILE_LOCAL)
|
if (file->type == web_file_t::FILE_LOCAL)
|
||||||
{
|
{
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
if (stat (file->fullpath, &sb) < 0)
|
if (stat (file->fullpath, &sb) < 0)
|
||||||
@ -333,15 +335,15 @@ http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
newpos = sb.st_size + offset;
|
newpos = sb.st_size + offset;
|
||||||
}
|
} else if (file->type == web_file_t::FILE_MEMORY) {
|
||||||
else if (file->type == FILE_MEMORY)
|
|
||||||
newpos = file->detail.memory.len + offset;
|
newpos = file->detail.memory.len + offset;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (file->type)
|
switch (file->type)
|
||||||
{
|
{
|
||||||
case FILE_LOCAL:
|
case web_file_t::FILE_LOCAL:
|
||||||
/* Just make sure we cannot seek before start of file. */
|
/* Just make sure we cannot seek before start of file. */
|
||||||
if (newpos < 0)
|
if (newpos < 0)
|
||||||
{
|
{
|
||||||
@ -357,7 +359,7 @@ http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FILE_MEMORY:
|
case web_file_t::FILE_MEMORY:
|
||||||
if (newpos < 0 || newpos > file->detail.memory.len)
|
if (newpos < 0 || newpos > file->detail.memory.len)
|
||||||
{
|
{
|
||||||
log_verbose ("%s: cannot seek: %s\n", file->fullpath, strerror (EINVAL));
|
log_verbose ("%s: cannot seek: %s\n", file->fullpath, strerror (EINVAL));
|
||||||
@ -383,10 +385,10 @@ http_close (UpnpWebFileHandle fh)
|
|||||||
|
|
||||||
switch (file->type)
|
switch (file->type)
|
||||||
{
|
{
|
||||||
case FILE_LOCAL:
|
case web_file_t::FILE_LOCAL:
|
||||||
close (file->detail.local.fd);
|
close (file->detail.local.fd);
|
||||||
break;
|
break;
|
||||||
case FILE_MEMORY:
|
case web_file_t::FILE_MEMORY:
|
||||||
/* no close operation */
|
/* no close operation */
|
||||||
if (file->detail.memory.contents)
|
if (file->detail.memory.contents)
|
||||||
free (file->detail.memory.contents);
|
free (file->detail.memory.contents);
|
@ -25,6 +25,6 @@
|
|||||||
#include <upnp/upnp.h>
|
#include <upnp/upnp.h>
|
||||||
#include <upnp/upnptools.h>
|
#include <upnp/upnptools.h>
|
||||||
|
|
||||||
struct UpnpVirtualDirCallbacks virtual_dir_callbacks;
|
extern struct UpnpVirtualDirCallbacks virtual_dir_callbacks;
|
||||||
|
|
||||||
#endif /* _HTTP_H_ */
|
#endif /* _HTTP_H_ */
|
0
appl/main.cpp
Normal file
0
appl/main.cpp
Normal file
@ -26,6 +26,8 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <upnp/upnp.h>
|
#include <upnp/upnp.h>
|
||||||
#include <upnp/upnptools.h>
|
#include <upnp/upnptools.h>
|
||||||
@ -89,7 +91,7 @@ is_valid_extension (const char *extension)
|
|||||||
static int
|
static int
|
||||||
get_list_length (void *list)
|
get_list_length (void *list)
|
||||||
{
|
{
|
||||||
void **l = list;
|
void **l = (void **)list;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
while (*(l++))
|
while (*(l++))
|
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "mime.h"
|
#include "mime.h"
|
||||||
#include "ushare.h"
|
#include "ushare.h"
|
||||||
@ -31,7 +33,7 @@
|
|||||||
#define UPNP_PLAYLIST "object.item.playlistItem"
|
#define UPNP_PLAYLIST "object.item.playlistItem"
|
||||||
#define UPNP_TEXT "object.item.textItem"
|
#define UPNP_TEXT "object.item.textItem"
|
||||||
|
|
||||||
const struct mime_type_t MIME_Type_List[] = {
|
struct mime_type_t MIME_Type_List[] = {
|
||||||
/* Video files */
|
/* Video files */
|
||||||
{ "asf", UPNP_VIDEO, "http-get:*:video/x-ms-asf:"},
|
{ "asf", UPNP_VIDEO, "http-get:*:video/x-ms-asf:"},
|
||||||
{ "avc", UPNP_VIDEO, "http-get:*:video/avi:"},
|
{ "avc", UPNP_VIDEO, "http-get:*:video/avi:"},
|
@ -29,4 +29,6 @@ struct mime_type_t {
|
|||||||
|
|
||||||
char *mime_get_protocol (struct mime_type_t *mime);
|
char *mime_get_protocol (struct mime_type_t *mime);
|
||||||
|
|
||||||
|
extern struct mime_type_t MIME_Type_List[];
|
||||||
|
|
||||||
#endif /* _MIME_H */
|
#endif /* _MIME_H */
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include <upnp/upnp.h>
|
#include <upnp/upnp.h>
|
||||||
#include <upnp/upnptools.h>
|
#include <upnp/upnptools.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "ushare.h"
|
#include "ushare.h"
|
||||||
#include "services.h"
|
#include "services.h"
|
@ -26,6 +26,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "osdep.h"
|
#include "osdep.h"
|
||||||
|
|
@ -27,6 +27,8 @@ static char rcsid[]="$Id: redblack.c,v 1.9 2003/10/24 01:31:21 damo Exp $";
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include "redblack.h"
|
#include "redblack.h"
|
||||||
|
|
||||||
#define assert(expr)
|
#define assert(expr)
|
@ -22,6 +22,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <upnp/upnp.h>
|
#include <upnp/upnp.h>
|
||||||
#include <upnp/upnptools.h>
|
#include <upnp/upnptools.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "ushare.h"
|
#include "ushare.h"
|
||||||
#include "services.h"
|
#include "services.h"
|
@ -27,6 +27,8 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__))
|
#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__))
|
||||||
@ -783,7 +785,7 @@ main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
name = malloc (strlen (XBOX_MODEL_NAME) + strlen (ut->model_name) + 4);
|
name = (char*)malloc (strlen (XBOX_MODEL_NAME) + strlen (ut->model_name) + 4);
|
||||||
sprintf (name, "%s (%s)", XBOX_MODEL_NAME, ut->model_name);
|
sprintf (name, "%s (%s)", XBOX_MODEL_NAME, ut->model_name);
|
||||||
free (ut->model_name);
|
free (ut->model_name);
|
||||||
ut->model_name = strdup (name);
|
ut->model_name = strdup (name);
|
@ -22,6 +22,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "util_iconv.h"
|
#include "util_iconv.h"
|
||||||
|
|
@ -32,23 +32,23 @@ def create(target, module_name):
|
|||||||
my_module = module.Module(__file__, module_name, get_type())
|
my_module = module.Module(__file__, module_name, get_type())
|
||||||
my_module.add_extra_compile_flags()
|
my_module.add_extra_compile_flags()
|
||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'src/http.c',
|
'appl/http.cpp',
|
||||||
'src/services.c',
|
'appl/services.cpp',
|
||||||
'src/ushare.c',
|
'appl/ushare.cpp',
|
||||||
'src/content.c',
|
'appl/content.cpp',
|
||||||
'src/trace.c',
|
'appl/trace.cpp',
|
||||||
'src/cms.c',
|
'appl/cms.cpp',
|
||||||
'src/redblack.c',
|
'appl/redblack.cpp',
|
||||||
'src/util_iconv.c',
|
'appl/util_iconv.cpp',
|
||||||
'src/osdep.c',
|
'appl/osdep.cpp',
|
||||||
'src/mime.c',
|
'appl/mime.cpp',
|
||||||
'src/cfgparser.c',
|
'appl/cfgparser.cpp',
|
||||||
'src/metadata.c',
|
'appl/metadata.cpp',
|
||||||
'src/msr.c',
|
'appl/msr.cpp',
|
||||||
'src/cds.c',
|
'appl/cds.cpp',
|
||||||
'src/presentation.c',
|
'appl/presentation.cpp',
|
||||||
'src/buffer.c',
|
'appl/buffer.cpp',
|
||||||
'src/ctrl_telnet.c'
|
'appl/ctrl_telnet.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_path(tools.get_current_path(__file__))
|
my_module.add_path(tools.get_current_path(__file__))
|
||||||
my_module.compile_flags('c', [
|
my_module.compile_flags('c', [
|
||||||
|
87
src/Makefile
87
src/Makefile
@ -1,87 +0,0 @@
|
|||||||
ifeq (,$(wildcard ../config.mak))
|
|
||||||
$(error "../config.mak is not present, run configure !")
|
|
||||||
endif
|
|
||||||
include ../config.mak
|
|
||||||
|
|
||||||
PROG = ushare
|
|
||||||
|
|
||||||
EXTRADIST = ushare.1 \
|
|
||||||
cds.h \
|
|
||||||
cms.h \
|
|
||||||
msr.h \
|
|
||||||
http.h \
|
|
||||||
presentation.h \
|
|
||||||
metadata.h \
|
|
||||||
mime.h \
|
|
||||||
services.h \
|
|
||||||
buffer.h \
|
|
||||||
util_iconv.h \
|
|
||||||
content.h \
|
|
||||||
cfgparser.h \
|
|
||||||
trace.h \
|
|
||||||
redblack.h \
|
|
||||||
osdep.h \
|
|
||||||
ctrl_telnet.h \
|
|
||||||
ushare.h \
|
|
||||||
gettext.h \
|
|
||||||
minmax.h \
|
|
||||||
|
|
||||||
|
|
||||||
SRCS = \
|
|
||||||
cds.c \
|
|
||||||
cms.c \
|
|
||||||
msr.c \
|
|
||||||
http.c \
|
|
||||||
presentation.c \
|
|
||||||
metadata.c \
|
|
||||||
mime.c \
|
|
||||||
services.c \
|
|
||||||
buffer.c \
|
|
||||||
util_iconv.c \
|
|
||||||
content.c \
|
|
||||||
cfgparser.c \
|
|
||||||
trace.c \
|
|
||||||
redblack.c \
|
|
||||||
osdep.c \
|
|
||||||
ctrl_telnet.c \
|
|
||||||
ushare.c
|
|
||||||
|
|
||||||
OBJS = $(SRCS:.c=.o)
|
|
||||||
|
|
||||||
.SUFFIXES: .c .o
|
|
||||||
|
|
||||||
all: depend $(PROG)
|
|
||||||
|
|
||||||
.c.o:
|
|
||||||
$(CC) -c $(CFLAGS) $(OPTFLAGS) -o $@ $<
|
|
||||||
|
|
||||||
$(PROG): $(OBJS)
|
|
||||||
$(CC) $(OBJS) $(LDFLAGS) $(EXTRALIBS) -o $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-$(RM) -f *.o $(PROG)
|
|
||||||
-$(RM) -f .depend
|
|
||||||
|
|
||||||
distclean:
|
|
||||||
|
|
||||||
install: $(PROG)
|
|
||||||
$(INSTALL) -d $(bindir)
|
|
||||||
$(INSTALL) $(PROG) $(bindir)
|
|
||||||
$(STRIP) $(INSTALLSTRIP) $(bindir)/$(PROG)
|
|
||||||
|
|
||||||
depend:
|
|
||||||
$(CC) -I.. -MM $(CFLAGS) $(SRCS) 1>.depend
|
|
||||||
|
|
||||||
.PHONY: clean distclean install depend
|
|
||||||
|
|
||||||
dist-all:
|
|
||||||
cp $(EXTRADIST) $(SRCS) Makefile $(DIST)
|
|
||||||
|
|
||||||
.PHONY: dist-all
|
|
||||||
|
|
||||||
#
|
|
||||||
# include dependency files if they exist
|
|
||||||
#
|
|
||||||
ifneq ($(wildcard .depend),)
|
|
||||||
include .depend
|
|
||||||
endif
|
|
Loading…
x
Reference in New Issue
Block a user