From c954c0457775c5e1426b27869fe61051209b0201 Mon Sep 17 00:00:00 2001 From: maxcodehack Date: Fri, 30 Oct 2020 17:41:58 +0000 Subject: [PATCH] Fix Makefiles in examples. - Cairo Remove unused -lapp flag - Freetype Add path to libs - rasterworks Fix some compilation errors - libguic_kolibri Add path to libs - kmenu Fix some compilation errors Now all can build without errors git-svn-id: svn://kolibrios.org@8122 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/C_Layer/EXAMPLE/kmenu/kmenu_example.c | 4 ++-- contrib/C_Layer/EXAMPLE/libguic_kolibri/Makefile | 4 ++-- contrib/C_Layer/EXAMPLE/rasterworks/rasterworks_example.c | 6 +++--- contrib/sdk/samples/cairo/Makefile | 2 +- contrib/sdk/samples/freetype/txview/Makefile | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/C_Layer/EXAMPLE/kmenu/kmenu_example.c b/contrib/C_Layer/EXAMPLE/kmenu/kmenu_example.c index 15ebcb516a..a3f9b64dad 100644 --- a/contrib/C_Layer/EXAMPLE/kmenu/kmenu_example.c +++ b/contrib/C_Layer/EXAMPLE/kmenu/kmenu_example.c @@ -41,7 +41,7 @@ int main() ksubmenu_add(main_menu, kmenuitem__submenu_new(KMENUITEM_SUBMENU, "File", sub_menu1)); ksubmenu_add(main_menu, kmenuitem__submenu_new(KMENUITEM_SUBMENU, "Edit", sub_menu2)); - extern volatile unsigned press_key; + unsigned press_key; do /* Start of main activity loop */ { @@ -59,7 +59,7 @@ int main() } press_key = key.val; - kolibri_handle_event_key(main_window); + kolibri_handle_event_key(main_window, key); } else if(gui_event == KOLIBRI_EVENT_BUTTON) { diff --git a/contrib/C_Layer/EXAMPLE/libguic_kolibri/Makefile b/contrib/C_Layer/EXAMPLE/libguic_kolibri/Makefile index ee1b2e1f65..b2535f1e3d 100644 --- a/contrib/C_Layer/EXAMPLE/libguic_kolibri/Makefile +++ b/contrib/C_Layer/EXAMPLE/libguic_kolibri/Makefile @@ -5,13 +5,13 @@ LD = kos32-ld SDK_DIR:= $(abspath ../../../sdk) CLAYER:= $(abspath ../../) -LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/lib/app-dynamic.lds \ +LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app-dynamic.lds \ --image-base 0 -lgcc -ldll -lc.dll CFLAGS = -g -U_Win32 -U_WIN32 -U__MINGW32__ -std=gnu90 -mno-ms-bitfields INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include -I$(CLAYER)/INCLUDE -LIBPATH:= -L $(SDK_DIR)/lib +LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib OBJPATH = $(CLAYER)/OBJ diff --git a/contrib/C_Layer/EXAMPLE/rasterworks/rasterworks_example.c b/contrib/C_Layer/EXAMPLE/rasterworks/rasterworks_example.c index 5ac70e2de8..ac77936194 100644 --- a/contrib/C_Layer/EXAMPLE/rasterworks/rasterworks_example.c +++ b/contrib/C_Layer/EXAMPLE/rasterworks/rasterworks_example.c @@ -19,7 +19,7 @@ int main() kolibri_window *main_window = kolibri_new_window(50, 50, 800, 300, "rasterworks example"); - extern volatile unsigned press_key; + unsigned press_key; int ln_str = countUTF8Z("Пример работы", -1); void *buffi = malloc(768*256*3 * sizeof(char)); @@ -43,7 +43,7 @@ int main() if(gui_event == KOLIBRI_EVENT_REDRAW) { kolibri_handle_event_redraw(main_window); - DrawBitmap(buffi, 5, 5, 768, 256); + DrawBitmap(buffi+8, 5, 5, 768, 256); } else if(gui_event == KOLIBRI_EVENT_KEY) { @@ -53,7 +53,7 @@ int main() } press_key = key.val; - kolibri_handle_event_key(main_window); + kolibri_handle_event_key(main_window, key); } else if(gui_event == KOLIBRI_EVENT_BUTTON) { diff --git a/contrib/sdk/samples/cairo/Makefile b/contrib/sdk/samples/cairo/Makefile index 40add9d7ce..e099fec21c 100644 --- a/contrib/sdk/samples/cairo/Makefile +++ b/contrib/sdk/samples/cairo/Makefile @@ -19,7 +19,7 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) default: cairo cairo: $(OBJECTS) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -Map cairo.map -o cairo $(OBJECTS) -lcairo2.dll -lgcc -lc.dll -lapp + $(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -Map cairo.map -o cairo $(OBJECTS) -lcairo2.dll -lgcc -lc.dll objcopy cairo -O binary %.o : %.c Makefile $(SOURCES) diff --git a/contrib/sdk/samples/freetype/txview/Makefile b/contrib/sdk/samples/freetype/txview/Makefile index a80db2dc66..ec8989604c 100644 --- a/contrib/sdk/samples/freetype/txview/Makefile +++ b/contrib/sdk/samples/freetype/txview/Makefile @@ -12,7 +12,7 @@ CFLAGS = -c -O2 -msse2 -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -U INCLUDES= -I./winlib -I./pxdraw -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/freetype/include INCLUDES+= -I $(CONTRIB_DIR)/toolchain/binutils/bfd -I $(CONTRIB_DIR)/toolchain/binutils/include -LIBPATH:= -L./ -L $(SDK_DIR)/lib +LIBPATH:= -L./ -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib LIB_SRCS= \ pxdraw/context.c \