Date:2011-02-24 10:01:17 (13 years 1 month ago)
Author:Xiangfu Liu
Commit:a0b6f7800269fc9dd4e95ae8f41acb62270cc27d
Message:new package: Easy Tic-Tac-Toe game

Files: tic-tac-toe/Makefile (1 diff)
tic-tac-toe/patches/001-replace-static-gcc.patch (1 diff)

Change Details

tic-tac-toe/Makefile
1#
2# This is free software, licensed under the GNU General Public License v2.
3# See /LICENSE for more information.
4#
5
6include $(TOPDIR)/rules.mk
7
8PKG_NAME:=tic-tac-toe
9PKG_VERSION:=1.0
10PKG_REV:=1ef5285d7fb188cd2049936f85de98cabc911144
11PKG_RELEASE:=1
12
13PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14PKG_SOURCE_URL:=git://github.com/garretraziel/gomoku.git
15PKG_SOURCE_PROTO:=git
16PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17PKG_SOURCE_VERSION:=$(PKG_REV)
18
19include $(INCLUDE_DIR)/package.mk
20
21define Package/tic-tac-toe
22  MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
23  SECTION:=games
24  CATEGORY:=Games
25  TITLE:=Easy Tic-Tac-Toe game
26  URL:=http://github.com/garretraziel/gomoku
27endef
28
29define Package/tic-tac-toe/description
30Easy Tic-Tac-Toe game, using SDL and own AI.
31endef
32
33TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/ \
34        -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
35        -L$(STAGING_DIR)/usr/lib
36
37define Package/tic-tac-toe/install
38    $(INSTALL_DIR) $(1)/usr/bin
39    $(INSTALL_BIN) $(PKG_BUILD_DIR)/gobango $(1)/usr/bin
40endef
41
42$(eval $(call BuildPackage,tic-tac-toe))
43
44# The following comments configure the Emacs editor. Just ignore them.
45# Local Variables:
46# compile-command: "make -C ~/openwrt-xburst.full_system package/tic-tac-toe/{clean,compile} -j2 V=99"
47# End:
tic-tac-toe/patches/001-replace-static-gcc.patch
1diff --git a/Makefile b/Makefile
2index 578e8af..e64d40f 100755
3--- a/Makefile
4@@ -5,30 +5,30 @@ HACKA=defines.h game.h human.h ai1.h ai2.h graphics.h
5 OCKA=main.o ai1.o ai2.o game.o human.o graphics.o
6
7
8-FLAGS=-std=c99 -pedantic -Wall
9+CFLAGS:=$(CFLAGS) -std=c99 -pedantic -Wall
10 LIBS=-lSDL -lSDL_gfx
11
12 build:$(program)
13
14 $(program): $(OCKA)
15- gcc $(FLAGS) $(OCKA) $(LIBS) -o $(program)
16+ $(CC) $(CFLAGS) $(OCKA) $(LIBS) -o $(program)
17
18 $(OCKA):$(HACKA)
19
20 main.o: main.c
21- gcc $(FLAGS) main.c -c
22+ $(CC) $(CFLAGS) main.c -c
23
24 ai1.o: ai1.c
25- gcc $(FLAGS) ai1.c -c
26+ $(CC) $(CFLAGS) ai1.c -c
27
28 ai2.o: ai2.c
29- gcc $(FLAGS) ai2.c -c
30+ $(CC) $(CFLAGS) ai2.c -c
31
32 game.o: game.c
33- gcc $(FLAGS) game.c -c
34+ $(CC) $(CFLAGS) game.c -c
35
36 human.o: human.c
37- gcc $(FLAGS) human.c -c
38+ $(CC) $(CFLAGS) human.c -c
39
40 graphics.o: graphics.c
41- gcc $(FLAGS) graphics.c -c
42+ $(CC) $(CFLAGS) graphics.c -c

Archive Download the corresponding diff file



interactive