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 += backlight.o
|
||||
|
||||
FONTS =
|
||||
FONTS += smallfonts
|
||||
FONTS += ubuntu18
|
||||
FONTS += orbitron14
|
||||
FONTS = $(basename $(wildcard fonts/*.c))
|
||||
|
||||
LIBNAME=lcd
|
||||
|
||||
|
@ -42,10 +39,10 @@ $(LIBFILE): $(OBJS)
|
|||
$(FOBJS): $(foreach ft,$(FONTS),$(ft).h) fonts.h
|
||||
|
||||
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
|
||||
|
||||
.PHONY: 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;
|
|
@ -38,7 +38,7 @@
|
|||
#ifndef __SMALLFONTS_H_
|
||||
#define __SMALLFONTS_H_
|
||||
|
||||
#include "fonts.h"
|
||||
#include "lcd/fonts.h"
|
||||
|
||||
/* Partially based on original code for the KS0108 by Stephane Rey */
|
||||
/* Current version by Kevin Townsend */
|
|
@ -1,3 +1,3 @@
|
|||
#include "fonts.h"
|
||||
#include "lcd/fonts.h"
|
||||
|
||||
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.
|
||||
###
|
||||
|
||||
my $width=2000;
|
||||
my $width=5000;
|
||||
my $height=100;
|
||||
my $xoff=30;
|
||||
my $xoff=90;
|
||||
|
||||
my $origsize;
|
||||
my $c1size;
|
||||
|
@ -320,7 +320,7 @@ close(C);
|
|||
|
||||
open (H,">",$file.".h")||die;
|
||||
print H <<EOF;
|
||||
#include "fonts.h"
|
||||
#include "lcd/fonts.h"
|
||||
|
||||
extern const struct FONT_DEF Font_$fonts;
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue