This repository was archived by the owner on Jul 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile.bittboy
More file actions
33 lines (26 loc) · 1.66 KB
/
Makefile.bittboy
File metadata and controls
33 lines (26 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CHAINPREFIX :=/opt/arm-buildroot-linux-uclibcgnueabi
CROSS_COMPILE := $(CHAINPREFIX)/usr/bin/arm-buildroot-linux-uclibcgnueabi-
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
STRIP = $(CROSS_COMPILE)strip
SYSROOT := $(shell $(CC) --print-sysroot)
SDL_CFLAGS := $(shell $(SYSROOT)/usr/bin/sdl-config --cflags)
SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs)
CFLAGS = -ggdb -DTARGET_BITTBOY -DTARGET=$(TARGET) -D__BUILDTIME__="$(BUILDTIME)" -DLOG_LEVEL=3 -g3 $(SDL_CFLAGS) #-I$(CHAINPREFIX)/usr/include/ -I$(SYSROOT)/usr/include/ -I$(SYSROOT)/usr/include/SDL/ # -mhard-float
CXXFLAGS = $(CFLAGS)
LDFLAGS = $(SDL_LIBS) -lfreetype -lSDL -lSDL_image -lSDL_ttf
pc:
gcc iotester.c -g -o iotester.dge -ggdb -O0 -DDEBUG -lSDL_image -lSDL -lSDL_ttf -I/usr/include/SDL
bittboy:
$(CXX) $(CFLAGS) $(LDFLAGS) iotester.c -o iotester.dge
ipk: retrogame
@rm -rf /tmp/.iotester-ipk/ && mkdir -p /tmp/.iotester-ipk/root/home/retrofw/apps/iotester /tmp/.iotester-ipk/root/home/retrofw/apps/gmenu2x/sections/applications
@cp -r iotester.dge iotester.png backdrop.png /tmp/.iotester-ipk/root/home/retrofw/apps/iotester
@cp iotester.lnk /tmp/.iotester-ipk/root/home/retrofw/apps/gmenu2x/sections/applications
@sed "s/^Version:.*/Version: $$(date +%Y%m%d)/" control > /tmp/.iotester-ipk/control
@tar --owner=0 --group=0 -czvf /tmp/.iotester-ipk/control.tar.gz -C /tmp/.iotester-ipk/ control
@tar --owner=0 --group=0 -czvf /tmp/.iotester-ipk/data.tar.gz -C /tmp/.iotester-ipk/root/ .
@echo 2.0 > /tmp/.iotester-ipk/debian-binary
@ar r iotester.ipk /tmp/.iotester-ipk/control.tar.gz /tmp/.iotester-ipk/data.tar.gz /tmp/.iotester-ipk/debian-binary
clean:
rm -rf iotester.dge iotester.ipk