Make clone for Linux and Mac OS X

This commit is contained in:
lexborisov 2017-03-16 23:15:55 +03:00
parent 5fd8812409
commit 66d5d951df
8 changed files with 50 additions and 10 deletions

View File

@ -166,7 +166,7 @@ clean: $(MODEST_BUILD_MODULES_TARGET_CLEAN)
for f in $(BUILD_SUB_DIRS); do $(MAKE) -C $$f clean; done for f in $(BUILD_SUB_DIRS); do $(MAKE) -C $$f clean; done
clone: clean_api $(MODEST_BUILD_MODULES_TARGET_CLONE) clone: clean_api $(MODEST_BUILD_MODULES_TARGET_CLONE)
find $(INCLUDE_DIR_API) -name "*.h" -exec sed -i '.bak' -E 's/^[ \t]*#[ \t]*include[ \t]*"([^"]+)"/#include <\1>/g' {} \; $(call MODEST_CLONE_SED_HEADER_COMMAND)
find $(INCLUDE_DIR_API) -name "*.h.bak" -exec rm -f {} \; find $(INCLUDE_DIR_API) -name "*.h.bak" -exec rm -f {} \;
clean_api: clean_api:

View File

@ -70,6 +70,7 @@ MODEST_BUILD_CLEAN_AFTER :=
# DEFAULT # DEFAULT
#*************** #***************
SED ?= sed SED ?= sed
MODEST_DIR_SEPARATOR ?= / MODEST_DIR_SEPARATOR ?= /
MODEST_PORT_NAME ?= posix MODEST_PORT_NAME ?= posix
@ -82,6 +83,8 @@ OS ?= $(shell uname -s)
prefix ?= /usr/local prefix ?= /usr/local
exec_prefix ?= $(prefix) exec_prefix ?= $(prefix)
MODEST_CLONE_SED_HEADER_COMMAND = find $(INCLUDE_DIR_API) -name "*.h" -exec sed -i.bak -e 's,\s*\#\s*include\s*"\([^"]*\)",\#include <\1>,g' {} \;
#******************** #********************
# Set -D # Set -D
#*************** #***************
@ -133,6 +136,8 @@ endif
# Darwin, Mac OS X # Darwin, Mac OS X
#******************* #*******************
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
MODEST_CLONE_SED_HEADER_COMMAND = find $(INCLUDE_DIR_API) -name "*.h" -exec sed -i '.bak' -E 's/^[ \t]*\#[ \t]*include[ \t]*"([^"]+)"/\#include <\1>/g' {} \;
MODEST_CFLAGS += -fPIC MODEST_CFLAGS += -fPIC
MODEST_CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable -Wno-unused-function -std=c99 MODEST_CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable -Wno-unused-function -std=c99
LIB_NAME_SUFFIX := .dylib LIB_NAME_SUFFIX := .dylib

View File

@ -0,0 +1,7 @@
myencoding_dirs := .
myencoding_objs := $(call BINARY_UTILS_OBJS,myencoding,$(myencoding_dirs))
myencoding_all: $(myencoding_objs)
myencoding_clean:
rm -f $(myencoding_objs)

View File

@ -20,7 +20,8 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <myhtml/api.h>
#include <myencoding/encoding.h>
#include "example.h" #include "example.h"

View File

@ -20,7 +20,8 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <myhtml/api.h>
#include <myencoding/encoding.h>
#include "example.h" #include "example.h"

View File

@ -22,7 +22,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <myhtml/api.h> #include <myencoding/encoding.h>
int main(int argc, const char * argv[]) int main(int argc, const char * argv[])
{ {

View File

@ -0,0 +1,32 @@
/*
Copyright (C) 2016-2017 Alexander Borisov
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Author: vincent.torri@gmail.com (Vincent Torri)
*/
#ifndef MyHTML_EXAMPLE_EXAMPLE_H
#define MyHTML_EXAMPLE_EXAMPLE_H
#pragma once
/* Format */
#ifdef _WIN32
#define MyCORE_FMT_Z "%Iu"
#else
#define MyCORE_FMT_Z "%zu"
#endif
#endif /* MyHTML_EXAMPLE_EXAMPLE_H */

View File

@ -2047,12 +2047,6 @@ myhtml_tree_node_t * myhtml_tree_appropriate_place_inserting_in_tree(myhtml_tree
break; break;
} }
#ifdef MyCORE_BUILD_DEBUG
if(idx_table == 0) {
MyCORE_DEBUG_ERROR("Appropriate place inserting; Step 2.5; idx_table is 0");
}
#endif
// step 2.6-7 // step 2.6-7
adjusted_location = target; adjusted_location = target;