Move fonts to subdirectory && automatically detect/compile all fonts
This commit is contained in:
parent
39696e59fd
commit
a41987c29c
|
@ -9,10 +9,7 @@ OBJS += render.o
|
||||||
OBJS += decoder.o
|
OBJS += decoder.o
|
||||||
OBJS += backlight.o
|
OBJS += backlight.o
|
||||||
|
|
||||||
FONTS =
|
FONTS = $(basename $(wildcard fonts/*.c))
|
||||||
FONTS += smallfonts
|
|
||||||
FONTS += ubuntu18
|
|
||||||
FONTS += orbitron14
|
|
||||||
|
|
||||||
LIBNAME=lcd
|
LIBNAME=lcd
|
||||||
|
|
||||||
|
@ -42,10 +39,10 @@ $(LIBFILE): $(OBJS)
|
||||||
$(FOBJS): $(foreach ft,$(FONTS),$(ft).h) fonts.h
|
$(FOBJS): $(foreach ft,$(FONTS),$(ft).h) fonts.h
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJS) $(LIBFILE) allfonts.h
|
rm -f $(OBJS) $(LIBFILE) fonts/*.o allfonts.h
|
||||||
|
|
||||||
render.o: render.c render.h display.h fonts.h
|
render.o: render.c render.h display.h fonts.h
|
||||||
|
|
||||||
.PHONY: allfonts.h
|
.PHONY: allfonts.h
|
||||||
allfonts.h:
|
allfonts.h:
|
||||||
for a in $(FONTS) ; do echo "#include <lcd/$$a.h>"; done > $@
|
(echo "#include <lcd/fonts.h>";for a in $(FONTS) ; do echo "#include <lcd/$$a.h>"; done) > $@
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,3 @@
|
||||||
#include "fonts.h"
|
#include "lcd/fonts.h"
|
||||||
|
|
||||||
extern const struct FONT_DEF Font_Orbitron14pt;
|
extern const struct FONT_DEF Font_Orbitron14pt;
|
|
@ -38,7 +38,7 @@
|
||||||
#ifndef __SMALLFONTS_H_
|
#ifndef __SMALLFONTS_H_
|
||||||
#define __SMALLFONTS_H_
|
#define __SMALLFONTS_H_
|
||||||
|
|
||||||
#include "fonts.h"
|
#include "lcd/fonts.h"
|
||||||
|
|
||||||
/* Partially based on original code for the KS0108 by Stephane Rey */
|
/* Partially based on original code for the KS0108 by Stephane Rey */
|
||||||
/* Current version by Kevin Townsend */
|
/* Current version by Kevin Townsend */
|
|
@ -1,3 +1,3 @@
|
||||||
#include "fonts.h"
|
#include "lcd/fonts.h"
|
||||||
|
|
||||||
extern const struct FONT_DEF Font_Ubuntu18pt;
|
extern const struct FONT_DEF Font_Ubuntu18pt;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
||||||
|
#include "lcd/fonts.h"
|
||||||
|
|
||||||
|
extern const struct FONT_DEF Font_Ubuntu29pt;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
||||||
|
#include "lcd/fonts.h"
|
||||||
|
|
||||||
|
extern const struct FONT_DEF Font_Ubuntu36pt;
|
|
@ -56,9 +56,9 @@ HELP
|
||||||
### Code starts here.
|
### Code starts here.
|
||||||
###
|
###
|
||||||
|
|
||||||
my $width=2000;
|
my $width=5000;
|
||||||
my $height=100;
|
my $height=100;
|
||||||
my $xoff=30;
|
my $xoff=90;
|
||||||
|
|
||||||
my $origsize;
|
my $origsize;
|
||||||
my $c1size;
|
my $c1size;
|
||||||
|
@ -320,7 +320,7 @@ close(C);
|
||||||
|
|
||||||
open (H,">",$file.".h")||die;
|
open (H,">",$file.".h")||die;
|
||||||
print H <<EOF;
|
print H <<EOF;
|
||||||
#include "fonts.h"
|
#include "lcd/fonts.h"
|
||||||
|
|
||||||
extern const struct FONT_DEF Font_$fonts;
|
extern const struct FONT_DEF Font_$fonts;
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue