Merge from default.

--HG--
branch : dtrg-videocore-branch-branch
This commit is contained in:
David Given
2016-03-13 21:13:09 +01:00
30 changed files with 328 additions and 167 deletions

View File

@@ -2,7 +2,7 @@
define build-simple-tool-impl
$(call reset)
$(call cfile, util/amisc/$1.c)
$(call file, $(LIBOBJECT))
$(call rawfile, $(LIBOBJECT))
$(call cprogram, $(BINDIR)/$1)
$(eval INSTALLABLES += $o)
$(call installto, $(INSDIR)/bin/$1)

View File

@@ -6,10 +6,10 @@ define build-aal-impl
$(call cfile, $D/archiver.c)
$(call file, $(LIBOBJECT))
$(call file, $(LIBPRINT))
$(call file, $(LIBSTRING))
$(call file, $(LIBSYSTEM))
$(call rawfile, $(LIBOBJECT))
$(call rawfile, $(LIBPRINT))
$(call rawfile, $(LIBSTRING))
$(call rawfile, $(LIBSYSTEM))
$(call cprogram, $(BINDIR)/aal)
$(call installto, $(INSDIR)/bin/aal)

25
util/cgg/build.mk Normal file
View File

@@ -0,0 +1,25 @@
D := util/cgg
define build-cgg-impl
$(call reset)
$(eval cflags += -I$D)
$(call yacc, $(OBJDIR)/$D, $D/bootgram.y)
$(call flex, $(OBJDIR)/$D, $D/bootlex.l)
$(call dependson, $(OBJDIR)/$D/y.tab.h)
$(call cfile, $D/main.c)
$(eval $q: $(INCDIR)/em_spec.h)
$(call rawfile, $(LIBEM_DATA))
$(call rawfile, $(LIBASSERT))
$(call rawfile, $(LIBSYSTEM))
$(call cprogram, $(BINDIR)/cgg)
$(eval CGG := $o)
endef
$(eval $(build-cgg-impl))

View File

@@ -1009,3 +1009,8 @@ max(a,b) {
return(a);
return(b);
}
int yywrap(void) {
return 1;
}

View File

@@ -3,12 +3,13 @@ D := util/data
define util-data-impl
$(eval g := \
$(OBJDIR)/$D/em_flag.c \
$(OBJDIR)/$D/em_pseu.c \
$(OBJDIR)/$D/em_mnem.c \
$(INCDIR)/em_spec.h \
$(INCDIR)/em_pseu.h \
$(INCDIR)/em_mnem.h \
$(OBJDIR)/$D/em_flag.c \
$(OBJDIR)/$D/em_pseu.c \
$(OBJDIR)/$D/em_mnem.c)
)
$(eval CLEANABLES += $g)
$(wordlist 2, $(words $g), $g): $(firstword $g)

View File

@@ -6,8 +6,8 @@ $(call reset)
$(eval cflags += -DVERBOSE -DNOTCOMPACT)
$(eval cflags += -I$D/share -I$(OBJDIR)/$D)
$(foreach f, $2, $(call cfile, $f))
$(call file, $(LIBDIR)/libegocore.a)
$(call file, $(LIBEM_DATA))
$(call rawfile, $(LIBDIR)/libegocore.a)
$(call rawfile, $(LIBEM_DATA))
$(call cprogram, $(BINDIR)/ego/$(strip $1))
$(call installto, $(PLATDEP)/ego/$(strip $1))
$(eval EGO_MODULES += $q)
@@ -166,9 +166,9 @@ $(call cfile, $D/em_ego/em_ego.c)
$(eval $q: $(INCDIR)/print.h $(INCDIR)/system.h)
$(eval $q: $(INCDIR)/em_path.h)
$(call file, $(LIBPRINT))
$(call file, $(LIBSTRING))
$(call file, $(LIBSYSTEM))
$(call rawfile, $(LIBPRINT))
$(call rawfile, $(LIBSTRING))
$(call rawfile, $(LIBSYSTEM))
$(call cprogram, $(BINDIR)/em_ego)
$(call installto, $(PLATDEP)/em_ego)

View File

@@ -114,9 +114,7 @@ start_child(p)
char *in_redirect = 0; /* standard input redirected */
char *out_redirect = 0; /* standard output redirected */
signal_child(SIGKILL); /* like families in China, this debugger is only
allowed one child
*/
signal_child(SIGKILL);
if (p != run_command) {
freenode(run_command);

View File

@@ -16,8 +16,8 @@ define build-led-impl
$(call cfile, $D/sym.c)
$(call cfile, $D/write.c)
$(call file, $(LIBSTRING))
$(call file, $(LIBOBJECT))
$(call rawfile, $(LIBSTRING))
$(call rawfile, $(LIBOBJECT))
$(call cprogram, $(BINDIR)/em_led)
$(call installto, $(PLATDEP)/em_led)

View File

@@ -14,13 +14,13 @@ define build-misc-impl
$(eval objdir := encode)
$(call cfile, $D/convert.c)
$(eval $q: $(INCDIR)/em_comp.h $(INCDIR)/em_codeEK.h)
$(call file, $(LIBREAD_EMEV))
$(call file, $(LIBEMK))
$(call file, $(LIBEM_DATA))
$(call file, $(LIBALLOC))
$(call file, $(LIBPRINT))
$(call file, $(LIBSTRING))
$(call file, $(LIBSYSTEM))
$(call rawfile, $(LIBREAD_EMEV))
$(call rawfile, $(LIBEMK))
$(call rawfile, $(LIBEM_DATA))
$(call rawfile, $(LIBALLOC))
$(call rawfile, $(LIBPRINT))
$(call rawfile, $(LIBSTRING))
$(call rawfile, $(LIBSYSTEM))
$(call cprogram, $(BINDIR)/em_encode)
$(call installto, $(PLATDEP)/em_encode)
$(eval EM_ENCODE := $o)
@@ -30,13 +30,13 @@ define build-misc-impl
$(eval objdir := decode)
$(call cfile, $D/convert.c)
$(eval $q: $(INCDIR)/em_comp.h $(INCDIR)/em_codeEK.h)
$(call file, $(LIBREAD_EMKV))
$(call file, $(LIBEME))
$(call file, $(LIBEM_DATA))
$(call file, $(LIBALLOC))
$(call file, $(LIBPRINT))
$(call file, $(LIBSTRING))
$(call file, $(LIBSYSTEM))
$(call rawfile, $(LIBREAD_EMKV))
$(call rawfile, $(LIBEME))
$(call rawfile, $(LIBEM_DATA))
$(call rawfile, $(LIBALLOC))
$(call rawfile, $(LIBPRINT))
$(call rawfile, $(LIBSTRING))
$(call rawfile, $(LIBSYSTEM))
$(call cprogram, $(BINDIR)/em_decode)
$(call installto, $(PLATDEP)/em_decode)
$(eval EM_DECODE := $o)

View File

@@ -26,7 +26,7 @@ $(call cfile, $D/var.c)
$(call cfile, $D/hall.c)
$(eval CLEANABLES += $(OBJDIR)/$D/enterkeyw.c)
$(OBJDIR)/$D/enterkeyw.c: $D/cvtkeywords $D/keywords
$(OBJDIR)/$D/enterkeyw.c: $D/cvtkeywords $D/keywords $(OBJDIR)/$D/y.tab.h
@echo KEYWORDS $$@
@mkdir -p $$(dir $$@)
$(hide) cd $$(dir $$@) && sh $(abspath $D/cvtkeywords) $(abspath $D/keywords)
@@ -34,7 +34,7 @@ $(call cfile, $(OBJDIR)/$D/enterkeyw.c)
$(eval $q: $(INCDIR)/em_spec.h)
$(call file, $(LIBEM_DATA))
$(call rawfile, $(LIBEM_DATA))
$(call cprogram, $(BINDIR)/ncgg)
$(eval NCGG := $o)

View File

@@ -10,12 +10,14 @@ $(call yacc, $(OBJDIR)/$D, $D/mktab.y)
$(call flex, $(OBJDIR)/$D, $D/scan.l)
$(call dependson, $(OBJDIR)/$D/y.tab.h)
$(call file, $(LIBEM_DATA))
$(call file, -lfl)
$(call rawfile, $(LIBEM_DATA))
$(call cprogram, $(OBJDIR)/$D/mktab)
endef
.PHONY: -lfl
-lfl:
define build-opt-impl
$(call reset)
@@ -53,12 +55,12 @@ $g: $(OBJDIR)/$D/mktab $D/patterns $(BINDIR)/cpp.ansi
$(hide) $(BINDIR)/cpp.ansi < $D/patterns | $(OBJDIR)/$D/mktab > $$@
$(call cfile, $g)
$(call file, $(LIBEM_DATA))
$(call file, $(LIBASSERT))
$(call file, $(LIBPRINT))
$(call file, $(LIBALLOC))
$(call file, $(LIBSYSTEM))
$(call file, $(LIBSTRING))
$(call rawfile, $(LIBEM_DATA))
$(call rawfile, $(LIBASSERT))
$(call rawfile, $(LIBPRINT))
$(call rawfile, $(LIBALLOC))
$(call rawfile, $(LIBSYSTEM))
$(call rawfile, $(LIBSTRING))
$(eval $q: $(INCDIR)/em_spec.h)
@@ -79,4 +81,4 @@ endef
$(eval $(build-opt-mktab-impl))
$(eval $(call build-opt-impl, em_opt,))
$(eval $(call build-opt-impl, em_opt2, -DGLOBAL_OPT))
$(eval $(build-opt-manpage-impl))
$(eval $(build-opt-manpage-impl))

View File

@@ -294,6 +294,10 @@ main() {
return nerrors;
}
int yywrap(void) {
return 1;
}
yyerror(s) char *s; {
fprintf(stderr,"line %d: %s\n",lino,s);

View File

@@ -15,11 +15,11 @@ define build-topgen-impl
$(call llgen, $(OBJDIR)/$D, $D/topgen.g)
$(call file, $(LIBASSERT))
$(call file, $(LIBPRINT))
$(call file, $(LIBALLOC))
$(call file, $(LIBSYSTEM))
$(call file, $(LIBSTRING))
$(call rawfile, $(LIBASSERT))
$(call rawfile, $(LIBPRINT))
$(call rawfile, $(LIBALLOC))
$(call rawfile, $(LIBSYSTEM))
$(call rawfile, $(LIBSTRING))
$(call cprogram, $(BINDIR)/topgen)
TOPGEN := $o