From 2c1cfd934caa37aaa566dc6ea8197ee92cc5ab6d Mon Sep 17 00:00:00 2001 From: pingflood Date: Wed, 22 May 2019 08:54:23 -0300 Subject: Initial RG commit --- Makefile | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index eb5e6ef..c8c14f5 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,19 @@ -CC = gcc +CHAINPREFIX := /opt/mipsel-linux-uclibc +CROSS_COMPILE := $(CHAINPREFIX)/usr/bin/mipsel-linux- -CFLAGS = -D_SDL -O0 -g -I/usr/include/SDL -Isrc -LDFLAGS = -lSDL -lm -lSDL_mixer +CC = $(CROSS_COMPILE)gcc + +SYSROOT := $(shell $(CC) --print-sysroot) + +SDL_CFLAGS = $(shell $(SYSROOT)/usr/bin/sdl-config --cflags) +SDL_LDFLAGS = $(shell $(SYSROOT)/usr/bin/sdl-config --libs) + + +CFLAGS = -D_SDL -DDINGUX -O2 -mips32 $(SDL_CFLAGS) -Isrc -std=c99 +LDFLAGS = -lSDL -lm -lSDL_mixer $(SDL_LDFLAGS) DEFINES = -Wall -OUTPUT = hcl.elf +OUTPUT = hcl/hcl.elf SOURCES = src/collision.c \ src/effect.c \ @@ -67,5 +76,8 @@ all: ${OUTPUT} ${OUTPUT}:${OBJS} ${CC} -o ${OUTPUT} ${OBJS} ${CFLAGS} ${LDFLAGS} ${DEFINES} +pack: + mksquashfs ./opk hydra.opk -all-root -noappend -no-exports -no-xattrs + clean: - rm src/*.o src/enemies/*.o src/sdl/*.o ${OUTPUT} + rm src/*.o src/sdl/*.o ${OUTPUT} -- cgit v1.2.3