Split off command-line options parsing from the main function
This commit is contained in:
parent
7cd9faefe0
commit
4dd410a2af
5 changed files with 196 additions and 130 deletions
6
makefile
6
makefile
|
|
@ -108,19 +108,19 @@ $(TESTDIR)/test.log.slow: $(OUTDIR)/connect4_$(UI_TESTING).elf
|
|||
|
||||
# Compile specifically the ncurses version
|
||||
# This one's special because it needs -lncursesw
|
||||
$(OUTDIR)/connect4_ncurses.elf: $(addprefix $(OBJDIR)/,ui_ncurses.o logic.o connect4.o LICENSE.o)
|
||||
$(OUTDIR)/connect4_ncurses.elf: $(addprefix $(OBJDIR)/,ui_ncurses.o logic.o connect4.o LICENSE.o commandline.o)
|
||||
@echo $(MSG_LINKING) $@
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(FLAGS) -lncursesw -o $@ $^
|
||||
|
||||
# Compile the final excecutable for a given UI target
|
||||
$(OUTDIR)/connect4_%.elf: $(addprefix $(OBJDIR)/,ui_%.o logic.o connect4.o LICENSE.o)
|
||||
$(OUTDIR)/connect4_%.elf: $(addprefix $(OBJDIR)/,ui_%.o logic.o connect4.o LICENSE.o commandline.o)
|
||||
@echo $(MSG_LINKING) $@
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(FLAGS) -o $@ $^
|
||||
|
||||
# Compile a windows excecutable
|
||||
$(OUTDIR)/connect4_%.exe: $(addprefix $(OBJDIR)/w64_,ui_%.o logic.o connect4.o LICENSE.o)
|
||||
$(OUTDIR)/connect4_%.exe: $(addprefix $(OBJDIR)/w64_,ui_%.o logic.o connect4.o LICENSE.o commandline.o)
|
||||
@echo $(MSG_LINKING) $@
|
||||
@mkdir -p $(@D)
|
||||
$(CC_W64) $(FLAGS) -o $@ $^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue