1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-05 04:33:43 +02:00

new package: Easy Tic-Tac-Toe game

This commit is contained in:
Xiangfu Liu 2011-02-24 17:01:17 +08:00
parent 7e4225e01c
commit 7af1552a8b
2 changed files with 90 additions and 0 deletions

47
tic-tac-toe/Makefile Normal file
View File

@ -0,0 +1,47 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=tic-tac-toe
PKG_VERSION:=1.0
PKG_REV:=1ef5285d7fb188cd2049936f85de98cabc911144
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=git://github.com/garretraziel/gomoku.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
include $(INCLUDE_DIR)/package.mk
define Package/tic-tac-toe
MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
SECTION:=games
CATEGORY:=Games
TITLE:=Easy Tic-Tac-Toe game
URL:=http://github.com/garretraziel/gomoku
endef
define Package/tic-tac-toe/description
Easy Tic-Tac-Toe game, using SDL and own AI.
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/ \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib
define Package/tic-tac-toe/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/gobango $(1)/usr/bin
endef
$(eval $(call BuildPackage,tic-tac-toe))
# The following comments configure the Emacs editor. Just ignore them.
# Local Variables:
# compile-command: "make -C ~/openwrt-xburst.full_system package/tic-tac-toe/{clean,compile} -j2 V=99"
# End:

View File

@ -0,0 +1,43 @@
diff --git a/Makefile b/Makefile
index 578e8af..e64d40f 100755
--- a/Makefile
+++ b/Makefile
@@ -5,30 +5,30 @@ HACKA=defines.h game.h human.h ai1.h ai2.h graphics.h
OCKA=main.o ai1.o ai2.o game.o human.o graphics.o
-FLAGS=-std=c99 -pedantic -Wall
+CFLAGS:=$(CFLAGS) -std=c99 -pedantic -Wall
LIBS=-lSDL -lSDL_gfx
build:$(program)
$(program): $(OCKA)
- gcc $(FLAGS) $(OCKA) $(LIBS) -o $(program)
+ $(CC) $(CFLAGS) $(OCKA) $(LIBS) -o $(program)
$(OCKA):$(HACKA)
main.o: main.c
- gcc $(FLAGS) main.c -c
+ $(CC) $(CFLAGS) main.c -c
ai1.o: ai1.c
- gcc $(FLAGS) ai1.c -c
+ $(CC) $(CFLAGS) ai1.c -c
ai2.o: ai2.c
- gcc $(FLAGS) ai2.c -c
+ $(CC) $(CFLAGS) ai2.c -c
game.o: game.c
- gcc $(FLAGS) game.c -c
+ $(CC) $(CFLAGS) game.c -c
human.o: human.c
- gcc $(FLAGS) human.c -c
+ $(CC) $(CFLAGS) human.c -c
graphics.o: graphics.c
- gcc $(FLAGS) graphics.c -c
+ $(CC) $(CFLAGS) graphics.c -c