Browse Source

Modernize build system

tags/0.1.2
Daniel 1 month ago
parent
commit
334086c598
5 changed files with 32 additions and 8 deletions
  1. +22
    -0
      Makefile
  2. +9
    -1
      app.c
  3. +1
    -1
      fbrp
  4. BIN
     
  5. +0
    -6
      option_default.h

+ 22
- 0
Makefile View File

@@ -0,0 +1,22 @@
DIR ?= /home/daniel/Documents/cli
DEF_REF ?= Ps 1 1
DEF_BIB ?= web

CC := gcc
CFLAGS := -Wall -D DIR='"bibles/$(DEF_BIB).i"' -D DEF_REF='"$(DEF_REF)"'

default: compile
test: compile demo

help:
@echo "For now, default settings are compiled with the program."
@echo "make DIR=$PWD DEF_REF=\"Ps 1 1\""

compile:
$(CC) $(CFLAGS) biblec/biblec.c fbrp/fbrp.c app.c -o heb12

demo:
@./heb12 -r "Heb 12 1"

install:
echo "export PATH=\$PATH:$PWD >> ~/.bashrc"

+ 9
- 1
app.c View File

@@ -5,7 +5,15 @@

#include "fbrp/fbrp.h"
#include "biblec/main.h"
#include "option.h"

// Just in case it didn't go through
#ifndef DIR
#define DIR "bibles/web.i"
#define DEF_REF "John 3 16"
#endif

char *defaultIndex = DIR;
char *defaultReference = DEF_REF;

struct Translation translation;



+ 1
- 1
fbrp

@@ -1 +1 @@
Subproject commit d16da55eadd6ff00a72037daf8c1d7610931ea9c
Subproject commit 890e624ed6e032e056da600dfd686e61b060043a

BIN
View File


+ 0
- 6
option_default.h View File

@@ -1,6 +0,0 @@
// This is a default option file.
// Copy to option.h for compilation.
// cp opttion_default.h option.h

char *defaultIndex = "/home/daniel/Documents/heb12";
char *defaultReference = "Ps 1 1";

Loading…
Cancel
Save