Permalink
Browse files

seperate compilation, licence and author name; 'clean' and 'deepclean…

…' in 'Makefile'
  • Loading branch information...
1 parent 622870d commit c5419cb1106f7c4cc733ce868ba4952b37150e19 Hugo Venturini committed Jun 5, 2011
Showing with 63 additions and 11 deletions.
  1. +43 −11 Makefile
  2. +20 −0 main.conf
View
@@ -1,19 +1,51 @@
-OPA=opa
-OPA_OPTIONS=
-GIT=git
+#
+# OpaTetris Makefile
+#
+# @author Hugo Venturini
+#
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+GIT?=git # used by 'make clean'
+OPA?=opa #
+
+S=@
+
+OPA_OPTIONS=--verbose $(OPAOPT)
+
+CONFIG_FILE=main.conf
LOGS=error.log access.log
-BUILD_DIRS=_build _tracks *.opx
-SRC=src/tetris.opa src/main.opa
+BUILD_DIRS=_build _tracks *.opx *.opx.broken
+
+SRC_DIR=src
+SRC_FILES=$(wildcard $(SRC_DIR)/*.opa)
+
+BIN_DIR=bin
+EXEC_NAME=main.exe
+EXEC=$(BIN_DIR)/$(EXEC_NAME)
-EXEC=main.exe
+INSTALL_DIR=/usr/bin/opa-tetris
all:
- $(OPA) $(OPA_OPTIONS) $(SRC) -o $(EXEC)
+ $(S) mkdir -vp $(BIN_DIR)
+ $(S) $(OPA) $(OPA_OPTIONS) $(CONFIG_FILE) $(SRC_FILES) -o $(EXEC)
+
+install:
+ $(S) install $(EXEC) $(INSTALL_DIR)
clean:
- rm -f $(EXEC)
- rm -fr $(BUILD_DIRS)
- rm -fr $(LOGS)
- $(GIT) clean -f
+ $(S) rm -fvr $(BUILD_DIRS)
+ $(S) rm -fvr $(LOGS)
+
+deepclean: clean
+ $(S) rm -fvr $(BIN_DIR)
+ $(S) $(GIT) clean -f
View
@@ -0,0 +1,20 @@
+
+#
+# OpaTetris module configuration
+#
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+mattgu74.tetris:
+ src/tetris.opa
+
+main:
+ import mattgu74.tetris
+ src/main.opa

0 comments on commit c5419cb

Please sign in to comment.