Usermode/AxWin3 - Fixed undefined memory usage
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / Makefile
index 1d67450..3bc24f8 100644 (file)
@@ -7,7 +7,7 @@ CFLAGS += -std=gnu99
 
 DIR := Apps/AxWin/3.0
 BIN := AxWinWM
-OBJ := main.o input.o video.o ipc.o image.o utf-8.o
+OBJ := main.o input.o video.o ipc.o image.o
 OBJ += wm.o wm_input.o wm_render.o wm_render_text.o wm_hotkeys.o
 OBJ += decorator.o
 OBJ += renderers/framebuffer.o
@@ -23,13 +23,36 @@ OBJ += renderers/widget/textinput.o
 OBJ += renderers/widget/spacer.o
 OBJ += renderers/widget/subwin.o
 
-LDFLAGS += -limage_sif -luri -lnet
+PNGIMAGES := toolbar_new.png toolbar_save.png toolbar_open.png
+
+LDFLAGS += -limage_sif -luri -lnet -lunicode
+
+IMG2SIF = ../../../../Tools/img2sif
 
 -include ../../Makefile.tpl
 
+.PHONY: install_resources
+
+install: install_resources
+
 #all: resources/LogoSmall.sif.res.h
 
 %.res.h: % Makefile
        echo "#define RESOURCE_$(notdir $<) \\"| sed -e 's/\./_/g' > $@
        base64 $< | sed -e 's/.*/"&"\\/' >> $@
        echo "" >> $@
+
+$(IMG2SIF):
+       $(MAKE) -C $(dir $(IMG2SIF)) img2sif
+
+all: $(addprefix resources/,$(PNGIMAGES:%.png=.%.sif))
+
+resources/.%.sif: $(IMG2SIF) Makefile resources/%.png
+       @echo img2sif resources/$*.png
+       @$(IMG2SIF) --rle1x32 resources/$*.png resources/.$*.sif
+
+install_%.sif: resources/.%.sif ;
+       @echo [xCP] $(DISTROOT)/$(DIR)/$*.sif
+       @$(xCP) $< $(DISTROOT)/$(DIR)/$*.sif
+
+install_resources: $(IMG2SIF) $(addprefix install_,$(PNGIMAGES:%.png=%.sif))

UCC git Repository :: git.ucc.asn.au