forked from snapshot112/minigame-menu
		
	Chad makefile, Thx artsiom
This commit is contained in:
		
							
								
								
									
										40
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | CFLAGS = -std=gnu11 -Wextra -pedantic -Wall -O0 -g3 -fsanitize=address | ||||||
|  | LDFLAGS = -lncurses -fsanitize=address | ||||||
|  | BUILD_DIR = build | ||||||
|  | SRC_DIR = src | ||||||
|  | GAMES_DIR = games | ||||||
|  | ENGINE_DIR = engine | ||||||
|  |  | ||||||
|  | MAIN_OBJECTS = $(BUILD_DIR)/main.o \ | ||||||
|  | 	$(BUILD_DIR)/minigame_menu.o \ | ||||||
|  | 	$(BUILD_DIR)/snake.o \ | ||||||
|  | 	$(BUILD_DIR)/maze_runner.o \ | ||||||
|  | 	$(BUILD_DIR)/minesweeper.o \ | ||||||
|  | 	$(BUILD_DIR)/manual.o \ | ||||||
|  | 	$(BUILD_DIR)/grid.o \ | ||||||
|  | 	$(BUILD_DIR)/grid_game_engine.o | ||||||
|  |  | ||||||
|  | .PHONY: clean | ||||||
|  |  | ||||||
|  | main: $(MAIN_OBJECTS) | ||||||
|  | 	cc $(LDFLAGS) -o main $^ | ||||||
|  |  | ||||||
|  | $(BUILD_DIR)/main.o: src/main.c | ||||||
|  | 	cc $(CFLAGS) -o $@ -c $^ | ||||||
|  | $(BUILD_DIR)/minigame_menu.o: src/games/minigame-menu/minigame_menu.c | ||||||
|  | 	cc $(CFLAGS) -o $@ -c $^ | ||||||
|  | $(BUILD_DIR)/snake.o: src/games/snake/snake.c | ||||||
|  | 	cc $(CFLAGS) -o $@ -c $^ | ||||||
|  | $(BUILD_DIR)/maze_runner.o: src/games/maze-runner/maze_runner.c | ||||||
|  | 	cc $(CFLAGS) -o $@ -c $^ | ||||||
|  | $(BUILD_DIR)/minesweeper.o: src/games/minesweeper/minesweeper.c | ||||||
|  | 	cc $(CFLAGS) -o $@ -c $^ | ||||||
|  | $(BUILD_DIR)/manual.o: src/games/manual/manual.c | ||||||
|  | 	cc $(CFLAGS) -o $@ -c $^ | ||||||
|  | $(BUILD_DIR)/grid.o: src/engine/grid/grid.c | ||||||
|  | 	cc $(CFLAGS) -o $@ -c $^ | ||||||
|  | $(BUILD_DIR)/grid_game_engine.o: src/engine/engine/grid_game_engine.c | ||||||
|  | 	cc $(CFLAGS) -o $@ -c $^ | ||||||
|  |  | ||||||
|  | clean: | ||||||
|  | 	rm -f build/*.o main | ||||||
| @@ -6,7 +6,7 @@ | |||||||
| #include "manual.h" | #include "manual.h" | ||||||
|  |  | ||||||
| #include <ncurses.h> | #include <ncurses.h> | ||||||
| #include "../../engine/grid_game_engine.h" | #include "../../engine/engine/grid_game_engine.h" | ||||||
|  |  | ||||||
| void manual(const coordinate display_location) { | void manual(const coordinate display_location) { | ||||||
|     erase(); |     erase(); | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ | |||||||
|  |  | ||||||
| #ifndef MINIGAME_MENU_MANUAL_H | #ifndef MINIGAME_MENU_MANUAL_H | ||||||
| #define MINIGAME_MENU_MANUAL_H | #define MINIGAME_MENU_MANUAL_H | ||||||
| #include "../../engine/grid_game_engine.h" | #include "../../engine/engine/grid_game_engine.h" | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * An in game manual for the minigames menu. |  * An in game manual for the minigames menu. | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
| #include <ncurses.h> | #include <ncurses.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
| #include "../../engine/grid_game_engine.h" | #include "../../engine/engine/grid_game_engine.h" | ||||||
|  |  | ||||||
| #define EMPTY ' ' | #define EMPTY ' ' | ||||||
| #define WALL '#' | #define WALL '#' | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ | |||||||
|  |  | ||||||
| #include <ncurses.h> | #include <ncurses.h> | ||||||
|  |  | ||||||
| #include "../../engine/grid_game_engine.h" | #include "../../engine/engine/grid_game_engine.h" | ||||||
|  |  | ||||||
| void minesweeper() { | void minesweeper() { | ||||||
|     clear(); |     clear(); | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
| #include <ncurses.h> | #include <ncurses.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
| #include "../../engine/grid_game_engine.h" | #include "../../engine/engine/grid_game_engine.h" | ||||||
| #include "../manual/manual.h" | #include "../manual/manual.h" | ||||||
| #include "../maze-runner/maze_runner.h" | #include "../maze-runner/maze_runner.h" | ||||||
| #include "../minesweeper/minesweeper.h" | #include "../minesweeper/minesweeper.h" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user