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 | |
| 6 | include $(TOPDIR)/rules.mk |
| 7 | |
| 8 | PKG_NAME:=tic-tac-toe |
| 9 | PKG_VERSION:=1.0 |
| 10 | PKG_REV:=1ef5285d7fb188cd2049936f85de98cabc911144 |
| 11 | PKG_RELEASE:=1 |
| 12 | |
| 13 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 14 | PKG_SOURCE_URL:=git://github.com/garretraziel/gomoku.git |
| 15 | PKG_SOURCE_PROTO:=git |
| 16 | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) |
| 17 | PKG_SOURCE_VERSION:=$(PKG_REV) |
| 18 | |
| 19 | include $(INCLUDE_DIR)/package.mk |
| 20 | |
| 21 | define 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 |
| 27 | endef |
| 28 | |
| 29 | define Package/tic-tac-toe/description |
| 30 | Easy Tic-Tac-Toe game, using SDL and own AI. |
| 31 | endef |
| 32 | |
| 33 | TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/ \ |
| 34 | -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ |
| 35 | -L$(STAGING_DIR)/usr/lib |
| 36 | |
| 37 | define Package/tic-tac-toe/install |
| 38 | $(INSTALL_DIR) $(1)/usr/bin |
| 39 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/gobango $(1)/usr/bin |
| 40 | endef |
| 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 |
| 1 | diff --git a/Makefile b/Makefile |
| 2 | index 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 |