feat: improve compilation a bit.
- tcc -> gcc (noticeably faster compilation)
This commit is contained in:
parent
b32749aa6e
commit
b129954d4d
9
makefile
9
makefile
|
@ -6,7 +6,7 @@
|
||||||
# make uninstall
|
# make uninstall
|
||||||
|
|
||||||
## C compiler
|
## C compiler
|
||||||
CC=gcc
|
CC=tcc # much faster compilation than gcc
|
||||||
|
|
||||||
## Main file
|
## Main file
|
||||||
SRC=rose.c
|
SRC=rose.c
|
||||||
|
@ -53,6 +53,13 @@ DEFAULT_DIR=/home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot
|
||||||
CURRENT_DIR=`pwd`
|
CURRENT_DIR=`pwd`
|
||||||
|
|
||||||
build: $(SRC) $(PLUGS) $(CONFIG)
|
build: $(SRC) $(PLUGS) $(CONFIG)
|
||||||
|
# Recompute constants
|
||||||
|
cd /plugins/readability/
|
||||||
|
sh recompute_READABILITY_N.sh
|
||||||
|
cd -
|
||||||
|
cd /plugins/style
|
||||||
|
sh recompute_STYLE_N.sh
|
||||||
|
cd -
|
||||||
# Make cache
|
# Make cache
|
||||||
mkdir -p $(CURRENT_CACHE_DIR)
|
mkdir -p $(CURRENT_CACHE_DIR)
|
||||||
# Hardcode cache path
|
# Hardcode cache path
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#define READABILITY_N 85133 + 1000
|
#define READABILITY_N 85314 + 1000
|
||||||
|
|
||||||
void read_readability_js(char* string)
|
void read_readability_js(char* string)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef READABILITY
|
#ifndef READABILITY
|
||||||
#define READABILITY
|
#define READABILITY
|
||||||
|
|
||||||
#define READABILITY_N 85133 + 1000
|
#define READABILITY_N 85314 + 1000
|
||||||
|
|
||||||
void read_readability_js(char* string);
|
void read_readability_js(char* string);
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
function sedr(){
|
sed_wrapper()
|
||||||
|
{
|
||||||
find ./ -type f -exec sed -i -e "$1" {} \;
|
find ./ -type f -exec sed -i -e "$1" {} \;
|
||||||
} ## e.g., sedr "s/target/replacement/g"
|
} ## e.g., sedr "s/target/replacement/g"
|
||||||
|
|
||||||
READABILITY_N=$(wc -c readability.js | cut -d " " -f 1)
|
READABILITY_N=`wc -c readability.js | cut -d " " -f 1`
|
||||||
sedr "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N + 1000/g"
|
sed_wrapper "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N + 1000/g"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
function sedr(){
|
sed_wrapper()
|
||||||
|
{
|
||||||
find ./ -type f -exec sed -i -e "$1" {} \;
|
find ./ -type f -exec sed -i -e "$1" {} \;
|
||||||
} ## e.g., sedr "s/target/replacement/g"
|
} ## e.g., sedr "s/target/replacement/g"
|
||||||
|
|
||||||
STYLE_N=$(wc -c style.js | cut -d " " -f 1)
|
STYLE_N=`wc -c style.js | cut -d " " -f 1`
|
||||||
sedr "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 1/g"
|
sed_wrapper "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 1/g"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user