summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-14 22:37:56 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-14 22:37:56 +0200
commitc41f692089ec680ca9ef2436d90ec3c599aeb86d (patch)
tree3c1bab033f07b033b897b28683774abc68240bcc /Makefile
downloadtris-c41f692089ec680ca9ef2436d90ec3c599aeb86d.tar.gz
tris-c41f692089ec680ca9ef2436d90ec3c599aeb86d.zip
Inital commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5b5c277
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+#-
+# This file is part of Tris Game.
+#
+# Tris Game is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Tris Game 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Tris Game. If not, see <http://www.gnu.org/licenses/>.
+#
+
+CC = gcc
+PROG = tris
+
+LIBS = x11 opengl glx
+
+SRC_DIR = src/main
+SRC != find ${SRC_DIR} -name *.c
+OBJ = ${SRC:.c=.o}
+
+CFLAGS != pkg-config --cflags ${LIBS}
+LFLAGS != pkg-config --libs ${LIBS}
+
+prova:
+ @echo ${LFLAGS}
+
+${PROG}: ${OBJ}
+ ${CC} ${OBJ} -o $@ ${LFLAGS}
+
+.c.o:
+ ${CC} ${CFLAGS} -c $< -o $@
+
+clean:
+ rm -rf ${OBJ}
+ rm -f ${PROG}