1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-22 13:29:21 +02:00

dega: using nanonote version source code

This commit is contained in:
Xiangfu Liu 2011-05-26 21:26:18 +08:00
parent 601c607e91
commit 6f32e10f74
2 changed files with 50 additions and 8 deletions

View File

@ -1,5 +1,6 @@
# #
# Copyright (C) 2010 OpenWrt.org # Copyright (C) 2011 Xiangfu Liu <xiangfu@sharism.cc>
# bitcoin: 1CGeqFzCZnAPEEcigr8LzmWTqf8cvo8toW
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -9,11 +10,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dega PKG_NAME:=dega
PKG_VERSION:=1.14 PKG_VERSION:=1.14
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=degap-$(PKG_VERSION).tar.gz PKG_SOURCE:=dega-$(PKG_VERSION)-NanoNote-Edition.tar.gz
PKG_SOURCE_URL:=@SF/dega PKG_SOURCE_URL:=@SF/dega
PKG_BUILD_DIR:=$(BUILD_DIR)/degap-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/dega-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -22,7 +23,7 @@ TARGET_CFLAGS+= -I$(STAGING_DIR)/usr/include/SDL
TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-lSDL -lSDL -ldirectfb -lfusion -lSDL -lSDL -ldirectfb -lfusion
define Package/degap define Package/dega
MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc> MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
SECTION:=games SECTION:=games
CATEGORY:=Games CATEGORY:=Games
@ -31,13 +32,13 @@ define Package/degap
DEPENDS:=+libsdl DEPENDS:=+libsdl
endef endef
define Package/degap/description define Package/dega/description
a emulator for sega master system and game gear which uses SDL a emulator for sega master system and game gear which uses SDL
endef endef
define Package/degap/install define Package/dega/install
$(INSTALL_DIR) $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dega $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/dega $(1)/usr/bin/
endef endef
$(eval $(call BuildPackage,degap)) $(eval $(call BuildPackage,dega))

View File

@ -0,0 +1,41 @@
diff --git a/Makefile b/Makefile
index c1d4b8a..0d1a876 100755
--- a/Makefile
+++ b/Makefile
@@ -3,12 +3,12 @@ OPTFLAGS=-O3 -fomit-frame-pointer -funroll-loops
#OPTFLAGS=-O3 -fomit-frame-pointer -funroll-loops -march=i686 -mcpu=i686
#OPTFLAGS=-xM -O3
-CC=gcc
+CC?=gcc
#CC=icc
#CXX=g++
#CXX=icpc
-CFLAGS= $(OPTFLAGS) $(shell sdl-config --cflags) -Imast -Iz80
+CFLAGS:=$(CFLAGS) $(OPTFLAGS) $(shell sdl-config --cflags) -Imast -Iz80
Z80OBJ = z80/z80.o
MASTOBJ = mast/area.o mast/dpsg.o mast/draw.o mast/emu2413.o mast/frame.o mast/load.o mast/map.o mast/mast.o mast/mem.o mast/samp.o mast/snd.o mast/vgm.o mast/state.o mast/setup.o
@@ -17,7 +17,7 @@ SDLOBJ = sdl/main.o
all: dega
dega: $(SDLOBJ) $(Z80OBJ) $(MASTOBJ)
- $(CC) -o dega $(SDLOBJ) $(Z80OBJ) $(MASTOBJ) $(shell sdl-config --libs)
+ $(CC) -o dega $(SDLOBJ) $(Z80OBJ) $(MASTOBJ) $(shell sdl-config --libs) $(LDFLAGS)
z80: $(Z80OBJ)
$(CC) -o $(Z80OBJ)
diff --git a/z80/z80.h b/z80/z80.h
index 066e32a..63200d5 100755
--- a/z80/z80.h
+++ b/z80/z80.h
@@ -1,6 +1,8 @@
#ifndef __Z80_H__
#define __Z80_H__
+#include<stdint.h>
+
#define CF 0x01
#define NF 0x02
#define PF 0x04