From ec6f4ebc543c3f4c24dec72a07f5f93dc63a749d Mon Sep 17 00:00:00 2001 From: Salvador Abreu Date: Tue, 18 Aug 2015 15:26:12 +0900 Subject: [PATCH] Include fz/examples in sources (similar to bench) Generate fd_init() call --- Makefile | 7 +++++-- fz/examples/aust-paccs.c | 2 ++ fz/paccs/output.pl | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 04a575b..2585811 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SRC = src -VPATH = $(SRC):bench +VPATH = $(SRC):bench:fz/examples ARCH = $(shell uname -s) @@ -74,7 +74,10 @@ else endif -FDC_SRCS = $(subst bench/,,$(wildcard bench/*.c)) +FDC_SRCS = \ + $(subst bench/,,$(wildcard bench/*.c)) \ + $(subst fz/examples/,,$(wildcard fz/examples/*.c)) + FDC_NAMES = $(subst .c,,$(FDC_SRCS)) FDC_BINS = $(FDC_NAMES) x diff --git a/fz/examples/aust-paccs.c b/fz/examples/aust-paccs.c index 24de9f5..8b0d545 100644 --- a/fz/examples/aust-paccs.c +++ b/fz/examples/aust-paccs.c @@ -4,6 +4,8 @@ int main(int argc, char *argv[]) { int i, j; + fd_init (&argc, &argv); + fd_int t = fd_new(1, 3); fd_int v = fd_new(1, 3); fd_int nsw = fd_new(1, 3); diff --git a/fz/paccs/output.pl b/fz/paccs/output.pl index 5103776..f2549da 100644 --- a/fz/paccs/output.pl +++ b/fz/paccs/output.pl @@ -121,7 +121,8 @@ cg_prefix --> "#include \"paccs.h\"\n\n", "int main(int argc, char *argv[])\n", "{\n", - " int i, j;\n". + " int i, j;\n\n", + " fd_init (&argc, &argv);\n". cg_suffix --> "}\n". -- libgit2 0.21.2