diff options
author | alejandro-colomar <colomar.6.4.3@gmail.com> | 2019-06-27 19:10:37 +0200 |
---|---|---|
committer | alejandro-colomar <colomar.6.4.3@gmail.com> | 2019-06-27 19:10:37 +0200 |
commit | 1d8b7aeafa8d312c438ba7eca8b8e2d71de249ea (patch) | |
tree | 6bfaa0cd2e11e817ee37d91cd6dc786ec80aae54 | |
parent | 7356be5d3afaba7755e7b3cdb18b029e8a6bbdd7 (diff) |
about -> share: Use string literals and concatenation to optimize
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | bin/Makefile | 6 | ||||
-rw-r--r-- | inc/vision-artificial/share/share.h (renamed from inc/vision-artificial/about/about.h) | 10 | ||||
-rw-r--r-- | inc/vision-artificial/share/share.hpp (renamed from inc/vision-artificial/about/about.hpp) | 10 | ||||
-rw-r--r-- | src/image/ocr.c | 13 | ||||
-rw-r--r-- | src/main.cpp | 3 | ||||
-rw-r--r-- | src/menu/clui.c | 2 | ||||
-rw-r--r-- | src/menu/parse.c | 2 | ||||
-rw-r--r-- | src/menu/tui.c | 94 | ||||
-rw-r--r-- | src/share/share.c (renamed from src/about/about.c) | 62 | ||||
-rw-r--r-- | tmp/Makefile | 12 | ||||
-rw-r--r-- | tmp/image/Makefile | 6 | ||||
-rw-r--r-- | tmp/menu/Makefile | 8 | ||||
-rw-r--r-- | tmp/share/Makefile (renamed from tmp/about/Makefile) | 20 |
14 files changed, 115 insertions, 140 deletions
@@ -1,4 +1,5 @@ #! /usr/bin/make -f + VERSION = 2 PATCHLEVEL = 1 SUBLEVEL = 0 @@ -148,11 +149,14 @@ CFLAGS_D += -D PROG_VERSION=\"$(PROGRAMVERSION)\" CFLAGS_D += -D INSTALL_SHARE_DIR=\"$(INSTALL_SHARE_DIR)\" CFLAGS_D += -D INSTALL_VAR_DIR=\"$(INSTALL_VAR_DIR)\" +CFLAGS_I = -I $(INC_DIR) + CFLAGS = $(CFLAGS_STD) CFLAGS += $(CFLAGS_OPT) CFLAGS += $(CFLAGS_W) CFLAGS += $(CFLAGS_PKG) CFLAGS += $(CFLAGS_D) +CFLAGS += $(CFLAGS_I) export CFLAGS @@ -182,11 +186,14 @@ CXXFLAGS_D = -D PROG_VERSION=\"$(PROGRAMVERSION)\" CXXFLAGS_D += -D INSTALL_SHARE_DIR=\"$(INSTALL_SHARE_DIR)\" CXXFLAGS_D += -D INSTALL_VAR_DIR=\"$(INSTALL_VAR_DIR)\" +CXXFLAGS_I = -I $(INC_DIR) + CXXFLAGS = $(CXXFLAGS_STD) CXXFLAGS += $(CXXFLAGS_OPT) CXXFLAGS += $(CXXFLAGS_W) CXXFLAGS += $(CXXFLAGS_PKG) CXXFLAGS += $(CXXFLAGS_D) +CXXFLAGS += $(CXXFLAGS_I) export CXXFLAGS diff --git a/bin/Makefile b/bin/Makefile index 8f5fa6b..99e6ebd 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -4,7 +4,6 @@ OBJS = \ $(TMP_DIR)/main.o \ - $(TMP_DIR)/about/about.o \ $(TMP_DIR)/ctrl/start.o \ $(TMP_DIR)/image/alx.o \ $(TMP_DIR)/image/calib3d.o \ @@ -25,13 +24,14 @@ OBJS = \ $(TMP_DIR)/proc/objects.o \ $(TMP_DIR)/proc/resistor.o \ $(TMP_DIR)/save/save.o \ + $(TMP_DIR)/share/share.o \ $(TMP_DIR)/user/clui.o \ $(TMP_DIR)/user/iface.o \ $(TMP_DIR)/user/tui.o DEPS_LIBS = \ - $(LIBALX_LIB_DIR)/libalx-base.a \ $(LIBALX_LIB_DIR)/libalx-gsl.a \ - $(LIBALX_LIB_DIR)/libalx-ncurses.a + $(LIBALX_LIB_DIR)/libalx-ncurses.a \ + $(LIBALX_LIB_DIR)/libalx-base.a ALL = $(BIN_NAME) size diff --git a/inc/vision-artificial/about/about.h b/inc/vision-artificial/share/share.h index 70a9f9c..08421ee 100644 --- a/inc/vision-artificial/about/about.h +++ b/inc/vision-artificial/share/share.h @@ -7,8 +7,8 @@ /****************************************************************************** ******* include guard ******************************************************** ******************************************************************************/ -#ifndef VA_ABOUT_ABOUT_H -#define VA_ABOUT_ABOUT_H +#ifndef VA_SHARE_SHARE_H +#define VA_SHARE_SHARE_H /****************************************************************************** @@ -24,6 +24,8 @@ #define PROG_NAME "vision-artificial" #define PROG_YEAR "2018" +#define SHARE_DIR "" INSTALL_SHARE_DIR "/vision-artificial/" + /****************************************************************************** ******* enums **************************************************************** @@ -45,13 +47,11 @@ enum Share_File { /****************************************************************************** ******* variables ************************************************************ ******************************************************************************/ -extern char share_path[FILENAME_MAX]; /****************************************************************************** ******* extern functions ***************************************************** ******************************************************************************/ -void about_init (void); void print_share_file (int share_file); void print_version (void); @@ -69,7 +69,7 @@ void print_version (void); /****************************************************************************** ******* include guard ******************************************************** ******************************************************************************/ -#endif /* vision-artificial/about/about.h */ +#endif /* vision-artificial/share/share.h */ /****************************************************************************** diff --git a/inc/vision-artificial/about/about.hpp b/inc/vision-artificial/share/share.hpp index d4f34b1..984c59f 100644 --- a/inc/vision-artificial/about/about.hpp +++ b/inc/vision-artificial/share/share.hpp @@ -7,8 +7,8 @@ /****************************************************************************** ******* include guard ******************************************************** ******************************************************************************/ -#ifndef VA_ABOUT_ABOUT_HPP -#define VA_ABOUT_ABOUT_HPP +#ifndef VA_SHARE_SHARE_HPP +#define VA_SHARE_SHARE_HPP /****************************************************************************** @@ -26,6 +26,8 @@ #define PROG_NAME "vision-artificial" #define PROG_YEAR "2018" +#define SHARE_DIR "" INSTALL_SHARE_DIR "/vision-artificial/" + /****************************************************************************** ******* enums **************************************************************** @@ -47,7 +49,6 @@ enum Share_File { /****************************************************************************** ******* variables ************************************************************ ******************************************************************************/ -extern char share_path [FILENAME_MAX]; /****************************************************************************** @@ -55,7 +56,6 @@ extern char share_path [FILENAME_MAX]; ******************************************************************************/ extern "C" { -void about_init (void); void print_share_file (int share_file); void print_version (void); } @@ -74,7 +74,7 @@ void print_version (void); /****************************************************************************** ******* include guard ******************************************************** ******************************************************************************/ -#endif /* vision-artificial/about/about.hpp */ +#endif /* vision-artificial/share/share.hpp */ /****************************************************************************** diff --git a/src/image/ocr.c b/src/image/ocr.c index 4f6d3de..24325b4 100644 --- a/src/image/ocr.c +++ b/src/image/ocr.c @@ -15,7 +15,10 @@ #include <tesseract/capi.h> -#include "vision-artificial/about/about.h" +#include "libalx/base/errno/perror.h" +#include "libalx/base/stddef/size.h" + +#include "vision-artificial/share/share.h" #include "vision-artificial/image/iface.h" @@ -99,11 +102,9 @@ static void img_ocr_read (const void *data) conf = data_cast->conf; switch (conf) { case IMG_IFACE_OCR_CONF_PRICE: - if (snprintf(conf_str, FILENAME_MAX, "%s/%s", - share_path, - "price") >= FILENAME_MAX) { - printf("Path is too large and has been truncated\n"); - printf("Price configuration was not possible!\n"); + if (snprintf(conf_str, sizeof(conf_str), "%s/%s", SHARE_DIR, + "price") >= SSIZEOF(conf_str)) { + alx_perror(conf_str); conf = IMG_IFACE_OCR_CONF_NONE; } break; diff --git a/src/main.cpp b/src/main.cpp index ffb519d..f46999d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,11 +16,11 @@ #undef LINES #undef COLS -#include "vision-artificial/about/about.hpp" #include "vision-artificial/image/iface.hpp" #include "vision-artificial/menu/iface.hpp" #include "vision-artificial/menu/parse.hpp" #include "vision-artificial/save/save.hpp" +#include "vision-artificial/share/share.hpp" #include "vision-artificial/user/iface.hpp" @@ -58,7 +58,6 @@ static void init (int argc, char *argv[]) alx_ncurses_init(); alx_ncurses_pause(); - about_init(); save_init(); menu_iface_mode = MENU_IFACE_TUI; diff --git a/src/menu/clui.c b/src/menu/clui.c index 5e947b7..a3d1930 100644 --- a/src/menu/clui.c +++ b/src/menu/clui.c @@ -14,8 +14,8 @@ #include "libalx/base/stdio/get.h" -#include "vision-artificial/about/about.h" #include "vision-artificial/ctrl/start.h" +#include "vision-artificial/share/share.h" /****************************************************************************** diff --git a/src/menu/parse.c b/src/menu/parse.c index 959ec5f..b93ab23 100644 --- a/src/menu/parse.c +++ b/src/menu/parse.c @@ -16,9 +16,9 @@ #include "libalx/base/stdio/sscan.h" -#include "vision-artificial/about/about.h" #include "vision-artificial/menu/iface.h" #include "vision-artificial/save/save.h" +#include "vision-artificial/share/share.h" #include "vision-artificial/user/iface.h" diff --git a/src/menu/tui.c b/src/menu/tui.c index 775cdc6..c5016bf 100644 --- a/src/menu/tui.c +++ b/src/menu/tui.c @@ -21,10 +21,10 @@ #include "libalx/extra/ncurses/get.h" #include "libalx/extra/ncurses/menu.h" -#include "vision-artificial/about/about.h" #include "vision-artificial/ctrl/start.h" #include "vision-artificial/proc/iface.h" #include "vision-artificial/save/save.h" +#include "vision-artificial/share/share.h" #include "vision-artificial/user/iface.h" @@ -62,6 +62,12 @@ static void menu_devel (void); ******************************************************************************/ void menu_tui (void) { + static const struct Alx_Ncurses_Menu mnu[] = { + {7, 4, "[0] Exit program"}, + {2, 4, "[1] Continue"}, + {4, 4, "[2] Disclaimer of warranty"}, + {5, 4, "[3] Terms and conditions"} + }; int_fast8_t h, w; bool wh; int_fast8_t sw; @@ -71,13 +77,6 @@ void menu_tui (void) h = 23; w = 80; - static const struct Alx_Ncurses_Menu mnu[] = { - {7, 4, "[0] Exit program"}, - {2, 4, "[1] Continue"}, - {4, 4, "[2] Disclaimer of warranty"}, - {5, 4, "[3] Terms and conditions"} - }; - wh = true; while (wh) { sw = alx_ncurses_menu(h, w, ARRAY_SIZE(mnu), mnu, "MENU:"); @@ -111,6 +110,15 @@ void menu_tui (void) ******************************************************************************/ static void menu_continue (void) { + static const struct Alx_Ncurses_Menu mnu[] = { + {8, 4, "[0] Back"}, + {2, 4, "[1] Start"}, + {3, 4, "[2] Select"}, + {4, 4, "[3] Series"}, + {5, 4, "[4] Change file name"}, + {6, 4, "[5] DEVEL"} + }; + static const char *const txt[] = {"File name:"}; WINDOW *win; int_fast8_t h, w; int_fast8_t r, c; @@ -123,26 +131,16 @@ static void menu_continue (void) r = 1; c = (80 - w) / 2; - static const struct Alx_Ncurses_Menu mnu[] = { - {8, 4, "[0] Back"}, - {2, 4, "[1] Start"}, - {3, 4, "[2] Select"}, - {4, 4, "[3] Series"}, - {5, 4, "[4] Change file name"}, - {6, 4, "[5] DEVEL"} - }; - /* Input box */ w2 = w - 8; r2 = r + h - 5; - static const char *const txt[] = {"File name:"}; wh = true; while (wh) { win = newwin(h, w, r, c); mvwprintw(win, mnu[1].r, mnu[1].c, "%s (File: \"%s\")", mnu[1].t, saved_name); - sw = alx_ncurses_w_menu(win, ARRAY_SIZE(mnu), mnu, "CONTINUE:"); + sw = alx_ncurses_menu_w(win, ARRAY_SIZE(mnu), mnu, "CONTINUE:"); switch (sw) { case 0: @@ -166,8 +164,8 @@ static void menu_continue (void) break; case 4: save_reset_fpath(); - alx_w_get_fname(saved_path, saved_name, true, w2, r2, - txt[0], NULL, 2); + alx_ncurses_get_fname(saved_path, saved_name, true, + w2, r2, txt[0], NULL, 2); alx_ncurses_delwin(win); break; case 5: @@ -182,17 +180,17 @@ static void menu_continue (void) static void menu_select (void) { + static const struct Alx_Ncurses_Menu mnu[] = { + {6, 4, "[0] Back"}, + {2, 4, "[1] Single image"}, + {4, 4, "[2] Series"} + }; int_fast8_t h, w; int_fast8_t sw; h = 23; w = 80; - static const struct Alx_Ncurses_Menu mnu[] = { - {6, 4, "[0] Back"}, - {2, 4, "[1] Single image"}, - {4, 4, "[2] Series"} - }; sw = alx_ncurses_menu(h, w, ARRAY_SIZE(mnu), mnu, "SELECT MODE:"); @@ -200,22 +198,14 @@ static void menu_select (void) case 1: start_mode = START_SINGLE; break; - case 2: start_mode = START_SERIES; break; } - } static void menu_series (void) { - int_fast8_t h, w; - int_fast8_t sw; - - h = 23; - w = 80; - static const struct Alx_Ncurses_Menu mnu[] = { {8, 4, "[0] Back"}, {2, 4, "[1] Label"}, @@ -224,6 +214,11 @@ static void menu_series (void) {5, 4, "[4] Resistor"}, {6, 4, "[5] Lighters"} }; + int_fast8_t h, w; + int_fast8_t sw; + + h = 23; + w = 80; sw = alx_ncurses_menu(h, w, ARRAY_SIZE(mnu), mnu, "SELECT LEVEL:"); @@ -249,6 +244,17 @@ static void menu_series (void) static void menu_devel (void) { + static const struct Alx_Ncurses_Menu mnu[] = { + {6, 4, "[0] Back"}, + {2, 4, "[1] Change process mode"}, + {3, 4, "[2] Change log mode"}, + {4, 4, "[3] Change user iface mode"} + }; + static const char *const txt[] = { + "Modes: 0=Auto; 1=Stop@prod; 2=Delay@step; 3=Stop@step", + "Modes: 0=Results; 1=Operations; 2=All", + "Modes: 1=CLUI; 2=TUI" + }; WINDOW *win; int_fast8_t h, w; int_fast8_t r, c; @@ -261,43 +267,31 @@ static void menu_devel (void) r = 1; c = (80 - w) / 2; - static const struct Alx_Ncurses_Menu mnu[] = { - {6, 4, "[0] Back"}, - {2, 4, "[1] Change process mode"}, - {3, 4, "[2] Change log mode"}, - {4, 4, "[3] Change user iface mode"} - }; - /* Input box */ w2 = w - 8; r2 = r + h - 5; - static const char *const txt[] = { - "Modes: 0=Auto; 1=Stop@prod; 2=Delay@step; 3=Stop@step", - "Modes: 0=Results; 1=Operations; 2=All", - "Modes: 1=CLUI; 2=TUI" - }; win = newwin(h, w, r, c); wh = true; while (wh) { - sw = alx_ncurses_w_menu(win, ARRAY_SIZE(mnu), mnu, + sw = alx_ncurses_menu_w(win, ARRAY_SIZE(mnu), mnu, "DEVELOPER OPTIONS:"); switch (sw) { case 0: wh = false; break; case 1: - proc_debug = alx_w_get_int(PROC_DBG_NO, 0, + proc_debug = alx_ncurses_get_int(PROC_DBG_NO, 0, PROC_DBG_STOP_STEP, w2, r2, txt[0], NULL, 2); break; case 2: - user_iface_log.visible = alx_w_get_u8(0, 2, 2, + user_iface_log.visible = alx_ncurses_get_u8(0, 2, 2, w2, r2, txt[1], NULL, 2); break; case 3: - user_iface_mode = alx_w_get_int(1, 2, 2, + user_iface_mode = alx_ncurses_get_int(1, 2, 2, w2, r2, txt[2], NULL, 2); break; } diff --git a/src/about/about.c b/src/share/share.c index 595f65f..0224b79 100644 --- a/src/about/about.c +++ b/src/share/share.c @@ -7,20 +7,25 @@ /****************************************************************************** ******* headers ************************************************************** ******************************************************************************/ -#include "vision-artificial/about/about.h" +#include "vision-artificial/share/share.h" -#include <errno.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include "libalx/base/errno/perror.h" #include "libalx/base/stddef/size.h" /****************************************************************************** ******* macros *************************************************************** ******************************************************************************/ +#define SHARE_DIR "" INSTALL_SHARE_DIR "/vision-artificial/" +#define SHARE_COPYRIGHT_FILE "" SHARE_DIR "/COPYRIGHT.txt" +#define SHARE_DISCLAIMER_FILE "" SHARE_DIR "/DISCLAIMER.txt" +#define SHARE_HELP_FILE "" SHARE_DIR "/HELP.txt" +#define SHARE_LICENSE_FILE "" SHARE_DIR "/LICENSE.txt" +#define SHARE_USAGE_FILE "" SHARE_DIR "/USAGE.txt" /****************************************************************************** @@ -36,7 +41,6 @@ /****************************************************************************** ******* variables ************************************************************ ******************************************************************************/ -char share_path [FILENAME_MAX]; /****************************************************************************** @@ -47,69 +51,37 @@ char share_path [FILENAME_MAX]; /****************************************************************************** ******* global functions ***************************************************** ******************************************************************************/ -void about_init (void) -{ - - if (snprintf(share_path, sizeof(share_path), "%s/vision-artificial/", - INSTALL_SHARE_DIR) >= SSIZEOF(share_path)) { - goto err; - } - return; -err: - fprintf(stderr, "Path is too large and has been truncated\n"); - exit(EXIT_FAILURE); -} - void print_share_file (int file) { - char fname [FILENAME_MAX]; + char *fname; char cmd[_POSIX_ARG_MAX]; switch (file) { case SHARE_COPYRIGHT: - if (snprintf(fname, sizeof(fname), "%s/%s", share_path, - "COPYRIGHT.txt") >= SSIZEOF(fname)) { - goto err; - } + fname = SHARE_COPYRIGHT_FILE; break; case SHARE_DISCLAIMER: - if (snprintf(fname, sizeof(fname), "%s/%s", share_path, - "DISCLAIMER.txt") >= SSIZEOF(fname)) { - goto err; - } + fname = SHARE_DISCLAIMER_FILE; break; case SHARE_HELP: - if (snprintf(fname, sizeof(fname), "%s/%s", share_path, - "HELP.txt") >= SSIZEOF(fname)) { - goto err; - } + fname = SHARE_HELP_FILE; break; case SHARE_LICENSE: - if (snprintf(fname, sizeof(fname), "%s/%s", share_path, - "LICENSE.txt") >= SSIZEOF(fname)) { - goto err; - } + fname = SHARE_LICENSE_FILE; break; case SHARE_USAGE: - if (snprintf(fname, sizeof(fname), "%s/%s", share_path, - "USAGE.txt") >= SSIZEOF(fname)) { - goto err; - } + fname = SHARE_USAGE_FILE; break; } if (snprintf(cmd, sizeof(cmd), "less %s", fname) >= SSIZEOF(cmd)) goto err; - if (system(cmd)) { - fprintf(stderr, "%s:%i: %s(): %s", __FILE__, __LINE__, __func__, - strerror(errno)); - } + if (system(cmd)) + alx_perror(cmd); return; - err: - fprintf(stderr, "Path is too large and has been truncated\n"); - fprintf(stderr, "File could not be shown!\n"); + alx_perror(cmd); } void print_version (void) diff --git a/tmp/Makefile b/tmp/Makefile index a944041..e52e98d 100644 --- a/tmp/Makefile +++ b/tmp/Makefile @@ -18,12 +18,12 @@ OBJ = \ MAIN_INC = \ $(LIBALX_INC_DIR)/libalx/base/stdio/wait.hpp \ $(LIBALX_INC_DIR)/libalx/extra/ncurses/common.hpp \ - $(INC_DIR)/vision-artificial/about/about.hpp \ $(INC_DIR)/vision-artificial/image/iface.hpp \ $(INC_DIR)/vision-artificial/menu/iface.hpp \ $(INC_DIR)/vision-artificial/menu/parse.hpp \ - $(INC_DIR)/vision-artificial/user/iface.hpp \ - $(INC_DIR)/vision-artificial/save/save.hpp + $(INC_DIR)/vision-artificial/save/save.hpp \ + $(INC_DIR)/vision-artificial/share/share.hpp \ + $(INC_DIR)/vision-artificial/user/iface.hpp MAIN_SRC = \ $(SRC_DIR)/main.cpp @@ -32,11 +32,11 @@ MAIN_SRC = \ # action PHONY := all -all: $(OBJ) about ctrl image menu proc save user +all: $(OBJ) share ctrl image menu proc save user -PHONY += about -about: +PHONY += share +share: @echo " MAKE tmp/$@" $(Q)$(MAKE) -C $(TMP_DIR)/$@/ diff --git a/tmp/image/Makefile b/tmp/image/Makefile index 2c167f0..ca859d0 100644 --- a/tmp/image/Makefile +++ b/tmp/image/Makefile @@ -56,8 +56,10 @@ IFACE_SRC = \ OCR_INC = \ $(INC_DIR)/vision-artificial/image/ocr.h \ - $(INC_DIR)/vision-artificial/about/about.h \ - $(INC_DIR)/vision-artificial/image/iface.h + $(LIBALX_INC_DIR)/libalx/base/errno/perror.hpp \ + $(LIBALX_INC_DIR)/libalx/base/stddef/size.hpp \ + $(INC_DIR)/vision-artificial/image/iface.h \ + $(INC_DIR)/vision-artificial/share/share.h OCR_SRC = \ $(SRC_DIR)/image/ocr.c diff --git a/tmp/menu/Makefile b/tmp/menu/Makefile index 31849bb..e27f83a 100644 --- a/tmp/menu/Makefile +++ b/tmp/menu/Makefile @@ -21,8 +21,8 @@ OBJ = \ CLUI_INC = \ $(INC_DIR)/vision-artificial/menu/clui.h \ $(LIBALX_INC_DIR)/libalx/base/stdio/get.h \ - $(INC_DIR)/vision-artificial/about/about.h \ - $(INC_DIR)/vision-artificial/ctrl/start.h + $(INC_DIR)/vision-artificial/ctrl/start.h \ + $(INC_DIR)/vision-artificial/share/share.h CLUI_SRC = \ $(SRC_DIR)/menu/clui.c @@ -36,9 +36,9 @@ IFACE_SRC = \ PARSE_INC = \ $(INC_DIR)/vision-artificial/menu/parse.h \ $(LIBALX_INC_DIR)/libalx/base/stdio/sscan.h \ - $(INC_DIR)/vision-artificial/about/about.h \ $(INC_DIR)/vision-artificial/menu/iface.h \ $(INC_DIR)/vision-artificial/save/save.h \ + $(INC_DIR)/vision-artificial/share/share.h \ $(INC_DIR)/vision-artificial/user/iface.h PARSE_SRC = \ $(SRC_DIR)/menu/parse.c @@ -50,10 +50,10 @@ TUI_INC = \ $(LIBALX_INC_DIR)/libalx/extra/ncurses/common.h \ $(LIBALX_INC_DIR)/libalx/extra/ncurses/get.h \ $(LIBALX_INC_DIR)/libalx/extra/ncurses/menu.h \ - $(INC_DIR)/vision-artificial/about/about.h \ $(INC_DIR)/vision-artificial/ctrl/start.h \ $(INC_DIR)/vision-artificial/proc/iface.h \ $(INC_DIR)/vision-artificial/save/save.h \ + $(INC_DIR)/vision-artificial/share/share.h \ $(INC_DIR)/vision-artificial/user/iface.h TUI_SRC = \ $(SRC_DIR)/menu/tui.c diff --git a/tmp/about/Makefile b/tmp/share/Makefile index bf3e3d2..0ae1f47 100644 --- a/tmp/about/Makefile +++ b/tmp/share/Makefile @@ -13,13 +13,13 @@ # dependencies OBJ = \ - about.o + share.o -ABOUT_INC = \ - $(INC_DIR)/vision-artificial/about/about.h \ +SHARE_INC = \ + $(INC_DIR)/vision-artificial/share/share.h \ $(LIBALX_INC_DIR)/libalx/base/stddef/size.h -ABOUT_SRC = \ - $(SRC_DIR)/about/about.c +SHARE_SRC = \ + $(SRC_DIR)/share/share.c ################################################################################ # target: dependencies @@ -29,11 +29,11 @@ PHONY := all all: $(OBJ) -about.s: $(ABOUT_SRC) $(ABOUT_INC) - @echo " CC vision-artificial/about/$@" - $(Q)$(CC) $(CFLAGS) -I $(INC_DIR) -S $< -o $@ -about.o: about.s - @echo " AS vision-artificial/about/$@" +share.s: $(SHARE_SRC) $(SHARE_INC) + @echo " CC vision-artificial/share/$@" + $(Q)$(CC) $(CFLAGS) -S $< -o $@ +share.o: share.s + @echo " AS vision-artificial/share/$@" $(Q)$(AS) $< -o $@ |