summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile19
-rw-r--r--freecell.c5
-rw-r--r--sol.c5
-rw-r--r--stack.h4
5 files changed, 20 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index c15f5a2..cf601f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,7 @@
-*.bmp
 *.o
 CARDS.DLL
 FREECELL.EXE
 SOL.EXE
 config.mk
-dump
 freecell
 sol
diff --git a/Makefile b/Makefile
index 073f0be..90e71e5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,24 @@
 CFLAGS += -std=c99 -Wall -Wextra -Wpedantic
+CFLAGS += -Icards
 
 include config.mk
 
-BINS = dump freecell sol
+BINS = freecell sol
+OBJS = ${BINS:%=%.o}
 
-all: $(BINS)
+all: ${BINS}
 
-$(BINS): cards.o
+${BINS}: cards/cards.o
 
 .o:
-	$(CC) $(LDFLAGS) $< cards.o $(LDLIBS) -o $@
+	${CC} ${LDFLAGS} $< cards/cards.o ${LDLIBS} -o $@
 
-cards.o dump.o freecell.o sol.o: cards.h
+${OBJS} cards/cards.o: cards/cards.h
 
-freecell.o sol.o: asset.h layout.h stack.h
+${OBJS}: asset.h layout.h stack.h
+
+cards/cards.h:
+	git submodule update --init
 
 clean:
-	rm -f $(BINS) *.o *.bmp
+	rm -f ${BINS} *.o cards/*.o
diff --git a/freecell.c b/freecell.c
index b7f6378..652ce3d 100644
--- a/freecell.c
+++ b/freecell.c
@@ -14,14 +14,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <SDL.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
 
+#include <SDL.h>
+#include <cards.h>
+
 #include "asset.h"
-#include "cards.h"
 #include "layout.h"
 #include "stack.h"
 
diff --git a/sol.c b/sol.c
index cf643f2..f16c7b6 100644
--- a/sol.c
+++ b/sol.c
@@ -14,14 +14,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <SDL.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
 
+#include <SDL.h>
+#include <cards.h>
+
 #include "asset.h"
-#include "cards.h"
 #include "layout.h"
 #include "stack.h"
 
diff --git a/stack.h b/stack.h
index f5140df..6daf9d0 100644
--- a/stack.h
+++ b/stack.h
@@ -17,11 +17,11 @@
 #ifndef STACK_H
 #define STACK_H
 
-#include <SDL_stdinc.h>
 #include <assert.h>
 #include <stdlib.h>
 
-#include "cards.h"
+#include <SDL_stdinc.h>
+#include <cards.h>
 
 #ifndef STACK_CAP
 #define STACK_CAP 52
amp;id=da2643bc8039de811b4b0e5e1ce367e9236153cd&follow=1'>Only change AWAY status for registered clientsJune McEnroe 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe