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
This commit is contained in:
maxcodehack 2020-10-30 17:41:58 +00:00
parent 4bdf135569
commit c954c04577
5 changed files with 9 additions and 9 deletions

View File

@ -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, "File", sub_menu1));
ksubmenu_add(main_menu, kmenuitem__submenu_new(KMENUITEM_SUBMENU, "Edit", sub_menu2)); 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 */ do /* Start of main activity loop */
{ {
@ -59,7 +59,7 @@ int main()
} }
press_key = key.val; press_key = key.val;
kolibri_handle_event_key(main_window); kolibri_handle_event_key(main_window, key);
} }
else if(gui_event == KOLIBRI_EVENT_BUTTON) else if(gui_event == KOLIBRI_EVENT_BUTTON)
{ {

View File

@ -5,13 +5,13 @@ LD = kos32-ld
SDK_DIR:= $(abspath ../../../sdk) SDK_DIR:= $(abspath ../../../sdk)
CLAYER:= $(abspath ../../) 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 --image-base 0 -lgcc -ldll -lc.dll
CFLAGS = -g -U_Win32 -U_WIN32 -U__MINGW32__ -std=gnu90 -mno-ms-bitfields 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 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 OBJPATH = $(CLAYER)/OBJ

View File

@ -19,7 +19,7 @@ int main()
kolibri_window *main_window = kolibri_new_window(50, 50, 800, 300, "rasterworks example"); 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); int ln_str = countUTF8Z("Пример работы", -1);
void *buffi = malloc(768*256*3 * sizeof(char)); void *buffi = malloc(768*256*3 * sizeof(char));
@ -43,7 +43,7 @@ int main()
if(gui_event == KOLIBRI_EVENT_REDRAW) if(gui_event == KOLIBRI_EVENT_REDRAW)
{ {
kolibri_handle_event_redraw(main_window); 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) else if(gui_event == KOLIBRI_EVENT_KEY)
{ {
@ -53,7 +53,7 @@ int main()
} }
press_key = key.val; press_key = key.val;
kolibri_handle_event_key(main_window); kolibri_handle_event_key(main_window, key);
} }
else if(gui_event == KOLIBRI_EVENT_BUTTON) else if(gui_event == KOLIBRI_EVENT_BUTTON)
{ {

View File

@ -19,7 +19,7 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
default: cairo default: cairo
cairo: $(OBJECTS) Makefile 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 objcopy cairo -O binary
%.o : %.c Makefile $(SOURCES) %.o : %.c Makefile $(SOURCES)

View File

@ -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./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 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= \ LIB_SRCS= \
pxdraw/context.c \ pxdraw/context.c \