<commit_before>#
# Makefile for rogue
# @(#)Makefile	4.21 (Berkeley) 02/04/99
#
# Rogue: Exploring the Dungeons of Doom
# Copyright (C) 1980-1983, 1985, 1999 <NAME>, <NAME> and <NAME>
# All rights reserved.
#
# See the file LICENSE.TXT for full copyright and licensing information.
#


PROGRAM  = rogue14
VERSION  = 1.2.7+
PREFIX   = /usr/local
SCOREDIR = $(PREFIX)/share/$(PROGRAM)/

CC       = cc
CFLAGS   = -O3 -Wall -Wextra -Werror -pedantic -std=c99
DFLAGS   = -DVERSION=\"$(VERSION)\" -DSCOREDIR=\"$(SCOREDIR)\"
LDFLAGS  = -lcurses

CFILES   = $(wildcard src/*.c)
OBJS     = $(addsuffix .o, $(basename $(CFILES)))
DOCSRC   = $(wildcard docsrc/*)
DOCS     = $(notdir $(DOCSRC))
MISC     = install CHANGELOG.TXT LICENSE.TXT rogue.png rogue.desktop

debug: CFLAGS += -g3
debug: $(PROGRAM)

.c.o:
	$(CC) $(CFLAGS) $(DFLAGS) -c -o $*.o $*.c

$(PROGRAM): $(OBJS)
	$(CC) -o $@ $(LDFLAGS) $(OBJS)

clean:
	$(RM) $(OBJS) $(PROGRAM) $(DOCS)

final: CFLAGS += -DNDEBUG
final: clean $(PROGRAM)

doc.nroff:
	tbl rogue.me | nroff -me | colcrt - > rogue.doc
	nroff -man rogue.6 | colcrt - > rogue.cat

doc.groff:
	groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc
	groff -man rogue.6 | sed -e 's/.\x08//g' > rogue.cat

docs:
	$(foreach doc, $(wildcard docsrc/*), \
	  sed -e 's/@PROGRAM@/$(PROGRAM)/' -e 's/@SCOREFILE@/.rogue14_highscore/' \
	  $(doc) > $(notdir $(doc));)

install: $(PROGRAM) docs<commit_msg>Set clang as debugging compiler<commit_after>#
# Makefile for rogue
# @(#)Makefile	4.21 (Berkeley) 02/04/99
#
# Rogue: Exploring the Dungeons of Doom
# Copyright (C) 1980-1983, 1985, 1999 <NAME>, <NAME> and <NAME>
# All rights reserved.
#
# See the file LICENSE.TXT for full copyright and licensing information.
#


PROGRAM  = rogue14
VERSION  = 1.2.7+
PREFIX   = /usr/local
SCOREDIR = $(PREFIX)/share/$(PROGRAM)/

CC       = cc
CFLAGS   = -O3 -Wall -Wextra -Werror -pedantic -std=c99
DFLAGS   = -DVERSION=\"$(VERSION)\" -DSCOREDIR=\"$(SCOREDIR)\"
LDFLAGS  = -lcurses

CFILES   = $(wildcard src/*.c)
OBJS     = $(addsuffix .o, $(basename $(CFILES)))
DOCSRC   = $(wildcard docsrc/*)
DOCS     = $(notdir $(DOCSRC))
MISC     = install CHANGELOG.TXT LICENSE.TXT rogue.png rogue.desktop

debug: CC      = clang
debug: CFLAGS += -Weverything -g3 -Wno-padded -Wno-disabled-macro-expansion
debug: $(PROGRAM)

.c.o:
	$(CC) $(CFLAGS) $(DFLAGS) -c -o $*.o $*.c

$(PROGRAM): $(OBJS)
	$(CC) -o $@ $(LDFLAGS) $(OBJS)

clean:
	$(RM) $(OBJS) $(PROGRAM) $(DOCS)

final: CFLAGS += -DNDEBUG
final: clean $(PROGRAM)

doc.nroff:
	tbl rogue.me | nroff -me | colcrt - > rogue.doc
	nroff -man rogue.6 | colcrt - > rogue.cat

doc.groff:
	groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc
	groff -man rogue.6 | sed -e 's/.\x08//g' > rogue.cat

docs:
	$(foreach doc, $(wildcard docsrc/*), \
	  sed -e 's/@PROGRAM@/$(PROGRAM)/' -e 's/@SCOREFILE@/.rogue14_highscore/' \
	  $(doc) > $(notdir $(doc));)

install: $(PROGRAM) docs
{'fraction_non_alphanumeric': 0.1978882833787466, 'fraction_numerical': 0.02861035422343324, 'mean_word_length': 3.1957142857142857, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1125245', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1217, 'n_words': 317}