1
0
mirror of https://github.com/abakh/nbsdgames.git synced 2024-12-04 14:46:22 -05:00
nbsdgames/Makefile

67 lines
2.8 KiB
Makefile
Raw Normal View History

2019-03-20 10:16:33 -04:00
# -*- Makefile -*-
2021-04-23 16:55:17 -04:00
CFLAGS+= -O3 -lncurses -Wno-unused-result
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
SCORES_DIR?=/usr/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-16 17:16:54 -04:00
touch $(SCORES_DIR)/pp_scores
touch $(SCORES_DIR)/jw_scores
touch $(SCORES_DIR)/mt_scores
touch $(SCORES_DIR)/mnch_scores
touch $(SCORES_DIR)/fsh_scores
touch $(SCORES_DIR)/drt_scores
chmod 666 $(SCORES_DIR)/pp_scores
chmod 666 $(SCORES_DIR)/jw_scores
chmod 666 $(SCORES_DIR)/mt_scores
chmod 666 $(SCORES_DIR)/mnch_scores
chmod 666 $(SCORES_DIR)/fsh_scores
chmod 666 $(SCORES_DIR)/drt_scores
2020-06-20 12:26:54 -04:00
2019-03-20 10:16:33 -04:00
jewels: jewels.c config.h
2020-09-12 06:38:45 -04:00
$(CC) jewels.c $(CFLAGS) -o ./jewels
2021-03-05 08:00:08 -05:00
sudoku: sudoku.c config.h
$(CC) sudoku.c $(CFLAGS) -lm -o ./sudoku
mines: mines.c config.h
$(CC) mines.c $(CFLAGS) -o ./mines
reversi: reversi.c config.h
$(CC) reversi.c $(CFLAGS) -o ./reversi
checkers: checkers.c config.h
$(CC) checkers.c $(CFLAGS) -o ./checkers
battleship: battleship.c config.h
$(CC) battleship.c $(CFLAGS) -o ./battleship
rabbithole: rabbithole.c config.h
$(CC) rabbithole.c $(CFLAGS) -o ./rabbithole
sos: sos.c config.h
$(CC) sos.c $(CFLAGS) -o ./sos
pipes: pipes.c config.h
$(CC) pipes.c $(CFLAGS) -o ./pipes
fifteen: fifteen.c config.h
2020-09-12 06:38:45 -04:00
$(CC) fifteen.c $(CFLAGS) -o ./fifteen
2019-05-13 09:58:19 -04:00
memoblocks: memoblocks.c
2020-09-12 06:38:45 -04:00
$(CC) memoblocks.c $(CFLAGS) -o ./memoblocks
2020-05-18 14:59:29 -04:00
fisher: fisher.c config.h
2020-09-12 06:38:45 -04:00
$(CC) fisher.c $(CFLAGS) -o ./fisher
2020-05-18 14:59:29 -04:00
muncher: muncher.c config.h
2020-09-12 06:38:45 -04:00
$(CC) muncher.c $(CFLAGS) -o ./muncher
2020-05-18 14:59:29 -04:00
miketron: miketron.c config.h
2020-09-12 06:38:45 -04:00
$(CC) miketron.c $(CFLAGS) -o ./miketron
2021-03-05 08:00:08 -05:00
redsquare: redsquare.c config.h
$(CC) redsquare.c $(CFLAGS) -o ./redsquare
darrt: darrt.c config.h
$(CC) darrt.c $(CFLAGS) -lm -o ./darrt
2021-04-16 17:16:54 -04:00
snakeduel: snakeduel.c config.h
$(CC) snakeduel.c $(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
install: scorefiles jewels sudoku mines reversi checkers battleship rabbithole sos pipes fifteen memoblocks fisher muncher miketron redsquare darrt snakeduel
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