2019-12-09 10:14:20 -07:00
|
|
|
BUILDUTILS=../buildutils
|
|
|
|
RESOURCES=../resources
|
|
|
|
SPLASHSCREEN=splash-vmwcblk.png
|
|
|
|
|
2019-12-11 12:05:53 -07:00
|
|
|
OBJS=main.o sysinput.o ep_init.o ep_upiwin.o ep_backlight.o ep_msg.o ep_graphics.o ep_devctxt.o ep_bitmap.o \
|
2019-12-11 10:45:45 -07:00
|
|
|
ep_upiwin_tmp.o ep_util.o fbinit.o rect.o gfxobj.o devctxt.o dc_screen.o fontengine.o \
|
2019-12-11 14:03:11 -07:00
|
|
|
bitmap.o stockobj.o fbprimitive.o log.o gpio.o msg_queue.o time_func.o config.o \
|
2019-12-11 13:20:45 -07:00
|
|
|
i_freehand.o i_line.o i_rect.o i_fillrect.o splash.o
|
2019-12-07 23:30:05 -07:00
|
|
|
LIBS=-lpython3.7m -lcrypt -lfreetype -lbcm2835 -lpthread -ldl -lutil -lm
|
|
|
|
CFLAGS=-I/usr/include/python3.7m -I/usr/include/freetype2 -I/usr/include/libpng16 \
|
2019-12-11 11:13:44 -07:00
|
|
|
-Wall -Werror -fstack-protector -fwrapv -fno-PIE -g -O3 -DDEBUG_ASSERT
|
2019-12-07 19:43:45 -07:00
|
|
|
LDFLAGS=-L/usr/lib/python3.7/config-3.7m-arm-linux-gnueabihf -Xlinker -export-dynamic -Wl,-O1 \
|
|
|
|
-Wl,-Bsymbolic-functions
|
2019-11-29 02:05:30 -07:00
|
|
|
|
2019-12-07 13:11:46 -07:00
|
|
|
all: upiwin
|
|
|
|
|
2019-11-29 02:05:30 -07:00
|
|
|
upiwin: $(OBJS)
|
2019-12-07 19:43:45 -07:00
|
|
|
gcc -o upiwin $(LDFLAGS) $(OBJS) $(LIBS)
|
2019-11-29 02:05:30 -07:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
gcc -c $(CFLAGS) $<
|
2019-12-02 23:30:46 -07:00
|
|
|
|
2019-12-11 13:22:39 -07:00
|
|
|
%.o: %.bin
|
2019-12-07 19:43:45 -07:00
|
|
|
objcopy -I binary -O elf32-littlearm -B arm --rename-section \
|
2019-12-11 13:20:45 -07:00
|
|
|
.data=.rodata,alloc,load,readonly,data,contents $< $@
|
2019-12-06 20:41:26 -07:00
|
|
|
|
2019-12-11 13:04:00 -07:00
|
|
|
splash.bin: $(RESOURCES)/$(SPLASHSCREEN) $(BUILDUTILS)/mkgfx
|
|
|
|
$(BUILDUTILS)/mkgfx $(RESOURCES)/$(SPLASHSCREEN) splash.bin
|
2019-12-06 20:41:26 -07:00
|
|
|
|
2019-12-11 13:20:45 -07:00
|
|
|
i_freehand.bin: $(RESOURCES)/i_freehand.png $(BUILDUTILS)/mkgfx
|
|
|
|
$(BUILDUTILS)/mkgfx $(RESOURCES)/i_freehand.png i_freehand.bin
|
|
|
|
|
|
|
|
i_line.bin: $(RESOURCES)/i_line.png $(BUILDUTILS)/mkgfx
|
|
|
|
$(BUILDUTILS)/mkgfx $(RESOURCES)/i_line.png i_line.bin
|
|
|
|
|
|
|
|
i_rect.bin: $(RESOURCES)/i_rect.png $(BUILDUTILS)/mkgfx
|
|
|
|
$(BUILDUTILS)/mkgfx $(RESOURCES)/i_rect.png i_rect.bin
|
|
|
|
|
|
|
|
i_fillrect.bin: $(RESOURCES)/i_fillrect.png $(BUILDUTILS)/mkgfx
|
|
|
|
$(BUILDUTILS)/mkgfx $(RESOURCES)/i_fillrect.png i_fillrect.bin
|
|
|
|
|
2019-12-02 23:30:46 -07:00
|
|
|
clean:
|
2019-12-06 20:51:41 -07:00
|
|
|
rm -f upiwin *.o splash.bin *~
|