1
0
Fork 0

shortening the Makefile

This commit is contained in:
me 2022-08-04 12:19:46 +04:30
parent 5a1ae538d0
commit 04e8559947
1 changed files with 3 additions and 16 deletions

View File

@ -12,7 +12,7 @@ LIBS=$(LIBS_PKG_CONFIG) -lm
ALL= nbsdgames jewels sudoku mines reversi checkers battleship rabbithole sos pipes fifteen memoblocks fisher muncher miketron redsquare darrt snakeduel tugow
SCORE_FILES= pipes_scores jewels_scores miketron_scores muncher_scores fisher_scores darrt_scores tugow_scores
SRC!=echo *.c *.h
all: $(ALL)
scorefiles:
@ -22,21 +22,8 @@ scorefiles:
manpages:
cp man/* $(DESTDIR)$(MAN_DIR)
# Games which only need config.h
sudoku mines reversi checkers battleship rabbithole sos fifteen redsquare snakeduel: config.h
$(CC) $(CFLAGS) $@.c $< $(LDFLAGS) $(LIBS) -o $@
# Games which need config.h and common.h
jewels pipes fisher muncher miketron darrt: config.h common.h
$(CC) $(CFLAGS) $@.c $< $(LDFLAGS) $(LIBS) -o $@
# Games which only need common.h
tugow: common.h
$(CC) $(CFLAGS) $@.c $< $(LDFLAGS) $(LIBS) -o $@
# Games which only need themselves
memoblocks nbsdgames:
$(CC) $(CFLAGS) $@.c $< $(LDFLAGS) $(LIBS) -o $@
$(ALL): $(SRC) config.h common.h
$(CC) $(CFLAGS) $@.c $(LDFLAGS) $(LIBS) -o $@
menu:
cp nbsdgames.desktop $(DESTIDR)$(PREFIX)/usr/share/applications