Skip to content

Instantly share code, notes, and snippets.

@tonitch
Created August 8, 2022 13:54
Show Gist options
  • Save tonitch/fa453bee97e41111ab6ee7eabbe0bdce to your computer and use it in GitHub Desktop.
Save tonitch/fa453bee97e41111ab6ee7eabbe0bdce to your computer and use it in GitHub Desktop.
CFLAGS += -Wall -g
LDFLAGS += -lncurses
SOURCES= $(wildcard *.cpp) config.h
all: chess
options:
@echo build options:
@echo "CFLAGS = $(CFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
@echo "CC = $(CC)"
chess: $(SOURCES)
$(CXX) $(CFLAGS) -o $@ $? $(LDFLAGS)
config.h: config.def.h
cp config.def.h config.h
clean:
rm -f chess config.h *.o
install: chess
@echo There is no install instruction yet. just take the binary.
run: chess
./chess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment