PROGRAM:=main
-OBJS:=sokoban.o
+OBJS:=sokoban.o mc.o
-CFLAGS=-O3 -Wextra -Wall -Werror -fno-strict-aliasing -std=gnu11
-CFLAGS+=-I./sylvan/src
+CFLAGS=-O3 -Wextra -Wall -Werror -fno-strict-aliasing -std=gnu11 \
+ -I./sylvan/src
-all: $(OBJS) $(PROGRAM)
+$(PROGRAM): $(PROGRAM).c $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $<
+
+%.o: %.c %.h
+ $(CC) $(CFLAGS) -c -o $@ $<
clean:
$(RM) -v $(PROGRAM) $(OBJS)
+#ifndef SOKOBAN_H
+#define SOKOBAN_H
+
+typedef enum {FREE, WALL, BOX, TARGET, AGENT, TARGAGENT, TARGBOX} sokoban_tile;
+
+struct sokoban_screen {
+ int x;
+ int y;
+ sokoban_tile tile;
+ sokoban_screen *next;
+};
+
+sokoban_screen *parse(FILE *stream);
+
+#endif