2019-03-20 10:16:33 -04:00
|
|
|
# -*- Makefile -*-
|
2021-04-23 16:55:17 -04:00
|
|
|
|
2021-04-24 04:59:40 -04:00
|
|
|
CFLAGS+= -O3 -Wno-unused-result
|
|
|
|
LDFLAGS+= -lncurses -lm
|
2021-04-20 10:09:41 -04:00
|
|
|
#-O3 --std=c99 -lcurses -DNO_MOUSE for NetBSD curses
|
|
|
|
#adding --std=c99 makes warnings in GNU, and the blame is upon glibc feature test macros. my code is correct.
|
|
|
|
|
2021-04-23 16:18:40 -04:00
|
|
|
GAMES_DIR?=/usr/games
|
2021-04-24 04:46:11 -04:00
|
|
|
SCORES_DIR?=/var/games
|
2021-04-20 10:09:41 -04:00
|
|
|
|
2021-04-16 17:16:54 -04:00
|
|
|
all: jewels sudoku mines reversi checkers battleship rabbithole sos pipes fifteen memoblocks fisher muncher miketron redsquare darrt snakeduel
|
2020-06-20 12:26:54 -04:00
|
|
|
scorefiles:
|
2021-04-24 04:46:11 -04:00
|
|
|
touch $(SCORES_DIR)/pipes_scores
|
|
|
|
touch $(SCORES_DIR)/jewels_scores
|
|
|
|
touch $(SCORES_DIR)/miketron_scores
|
|
|
|
touch $(SCORES_DIR)/muncher_scores
|
|
|
|
touch $(SCORES_DIR)/fisher_scores
|
|
|
|
touch $(SCORES_DIR)/darrt_scores
|
|
|
|
chmod 666 $(SCORES_DIR)/pipes_scores
|
|
|
|
chmod 666 $(SCORES_DIR)/jewels_scores
|
|
|
|
chmod 666 $(SCORES_DIR)/miketron_scores
|
|
|
|
chmod 666 $(SCORES_DIR)/muncher_scores
|
|
|
|
chmod 666 $(SCORES_DIR)/fisher_scores
|
|
|
|
chmod 666 $(SCORES_DIR)/darrt_scores
|
2020-06-20 12:26:54 -04:00
|
|
|
|
2021-04-24 04:46:11 -04:00
|
|
|
jewels: jewels.c config.h common.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) jewels.c $(LDFLAGS) $(CFLAGS) -o ./jewels
|
2021-04-24 04:46:11 -04:00
|
|
|
sudoku: sudoku.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) sudoku.c $(LDFLAGS) $(CFLAGS) -lm -o ./sudoku
|
2021-03-05 08:00:08 -05:00
|
|
|
mines: mines.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) mines.c $(LDFLAGS) $(CFLAGS) -o ./mines
|
2021-03-05 08:00:08 -05:00
|
|
|
reversi: reversi.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) reversi.c $(LDFLAGS) $(CFLAGS) -o ./reversi
|
2021-03-05 08:00:08 -05:00
|
|
|
checkers: checkers.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) checkers.c $(LDFLAGS) $(CFLAGS) -o ./checkers
|
2021-03-05 08:00:08 -05:00
|
|
|
battleship: battleship.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) battleship.c $(LDFLAGS) $(CFLAGS) -o ./battleship
|
2021-03-05 08:00:08 -05:00
|
|
|
rabbithole: rabbithole.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) rabbithole.c $(LDFLAGS) $(CFLAGS) -o ./rabbithole
|
2021-03-05 08:00:08 -05:00
|
|
|
sos: sos.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) sos.c $(LDFLAGS) $(CFLAGS) -o ./sos
|
2021-03-05 08:00:08 -05:00
|
|
|
pipes: pipes.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) pipes.c $(LDFLAGS) $(CFLAGS) -o ./pipes
|
2021-03-05 08:00:08 -05:00
|
|
|
fifteen: fifteen.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) fifteen.c $(LDFLAGS) $(CFLAGS) -o ./fifteen
|
2019-05-13 09:58:19 -04:00
|
|
|
memoblocks: memoblocks.c
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) memoblocks.c $(LDFLAGS) $(CFLAGS) -o ./memoblocks
|
2021-04-24 04:46:11 -04:00
|
|
|
fisher: fisher.c config.h common.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) fisher.c $(LDFLAGS) $(CFLAGS) -o ./fisher
|
2021-04-24 04:46:11 -04:00
|
|
|
muncher: muncher.c config.h common.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) muncher.c $(LDFLAGS) $(CFLAGS) -o ./muncher
|
2021-04-24 04:46:11 -04:00
|
|
|
miketron: miketron.c config.h common.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) miketron.c $(LDFLAGS) $(CFLAGS) -o ./miketron
|
2021-03-05 08:00:08 -05:00
|
|
|
redsquare: redsquare.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) redsquare.c $(LDFLAGS) $(CFLAGS) -o ./redsquare
|
2021-04-24 04:46:11 -04:00
|
|
|
darrt: darrt.c config.h common.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) darrt.c $(LDFLAGS) $(CFLAGS) -lm -o ./darrt
|
2021-04-16 17:16:54 -04:00
|
|
|
|
|
|
|
snakeduel: snakeduel.c config.h
|
2021-04-24 04:59:40 -04:00
|
|
|
$(CC) snakeduel.c $(LDFLAGS) $(CFLAGS) -o ./snakeduel
|
2019-03-20 10:16:33 -04:00
|
|
|
clean:
|
2021-04-16 17:16:54 -04:00
|
|
|
rm ./jewels ./sudoku ./checkers ./mines ./reversi ./battleship ./rabbithole ./sos ./pipes ./fifteen ./memoblocks ./fisher ./muncher ./miketron ./redsquare ./darrt ./snakeduel
|
2019-03-20 10:16:33 -04:00
|
|
|
uninstall:
|
2021-04-16 17:16:54 -04:00
|
|
|
rm $(GAMES_DIR)/jewels $(GAMES_DIR)/sudoku $(GAMES_DIR)/checkers $(GAMES_DIR)/mines $(GAMES_DIR)/reversi $(GAMES_DIR)/battleship $(GAMES_DIR)/rabbithole $(GAMES_DIR)/sos $(GAMES_DIR)/pipes $(GAMES_DIR)/fifteen $(GAMES_DIR)/memoblocks $(GAMES_DIR)/fisher $(GAMES_DIR)/muncher $(GAMES_DIR)/miketron $(GAMES_DIR)/redsquare $(GAMES_DIR)/darrt $(GAMES_DIR)/snakeduel
|
2021-04-24 05:01:55 -04:00
|
|
|
install: jewels sudoku mines reversi checkers battleship rabbithole sos pipes fifteen memoblocks fisher muncher miketron redsquare darrt snakeduel
|
2021-04-16 17:16:54 -04:00
|
|
|
cp jewels sudoku mines reversi checkers battleship rabbithole sos pipes fifteen memoblocks fisher muncher miketron redsquare darrt snakeduel $(GAMES_DIR)
|
2019-03-20 10:16:33 -04:00
|
|
|
|