Makefile update

This commit is contained in:
Markus Gans 2015-06-08 20:42:17 +02:00
parent b3ae9930f7
commit 56fb44b8cc
5 changed files with 54 additions and 35 deletions

View File

@ -90,7 +90,7 @@ all: dep $(OBJS)
$(LIB): all
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -W -Wall -pedantic"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic"
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"

View File

@ -10,6 +10,7 @@ noinst_PROGRAMS = \
dialog \
input-dialog \
mandelbrot \
calculator \
fstring \
timer \
ui
@ -18,6 +19,7 @@ hello_SOURCES = hello.cpp
dialog_SOURCES = dialog.cpp
input_dialog_SOURCES = input-dialog.cpp
mandelbrot_SOURCES = mandelbrot.cpp
calculator_SOURCES = calculator.cpp
fstring_SOURCES = fstring.cpp
timer_SOURCES = timer.cpp
ui_SOURCES = ui.cpp

View File

@ -12,14 +12,15 @@ MAKEFILE = -f Makefile.clang
LDFLAGS = -L../src -lfinal
INCLUDES = -I../src
RM = rm -f
PROGS = hello dialog input-dialog mandelbrot fstring timer ui
PROGS = hello dialog input-dialog mandelbrot calculator fstring timer ui
OBJS1 = hello.o
OBJS2 = dialog.o
OBJS3 = input-dialog.o
OBJS4 = mandelbrot.o
OBJS5 = fstring.o
OBJS6 = timer.o
OBJS7 = ui.o
OBJS5 = calculator.o
OBJS6 = fstring.o
OBJS7 = timer.o
OBJS8 = ui.o
ifdef DEBUG
OPTIMIZE = -O0
@ -48,14 +49,17 @@ input-dialog: $(OBJS3)
mandelbrot: $(OBJS4)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o mandelbrot $(OBJS4)
fstring: $(OBJS5)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o fstring $(OBJS5)
calculator: $(OBJS5)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o calculator $(OBJS5)
timer: $(OBJS6)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o timer $(OBJS6)
fstring: $(OBJS6)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o fstring $(OBJS6)
ui: $(OBJS7)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o ui $(OBJS7)
timer: $(OBJS7)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o timer $(OBJS7)
ui: $(OBJS8)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o ui $(OBJS8)
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -W -Wall -Weverything -Wpadded -pedantic"
@ -65,7 +69,7 @@ profile:
.PHONY: clean dep
clean:
$(RM) $(PROGS) $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7) .depend *.gch *.plist *~
$(RM) $(PROGS) $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7) $(OBJS8) .depend *.gch *.plist *~
dep:
$(CXX) -MM $(INCLUDES) *.cpp >.depend

View File

@ -12,14 +12,15 @@ MAKEFILE = -f Makefile.gcc
LDFLAGS = -L../src -lfinal
INCLUDES = -I../src
RM = rm -f
PROGS = hello dialog input-dialog mandelbrot fstring timer ui
PROGS = hello dialog input-dialog mandelbrot calculator fstring timer ui
OBJS1 = hello.o
OBJS2 = dialog.o
OBJS3 = input-dialog.o
OBJS4 = mandelbrot.o
OBJS5 = fstring.o
OBJS6 = timer.o
OBJS7 = ui.o
OBJS5 = calculator.o
OBJS6 = fstring.o
OBJS7 = timer.o
OBJS8 = ui.o
ifdef DEBUG
OPTIMIZE = -O0
@ -48,24 +49,27 @@ input-dialog: $(OBJS3)
mandelbrot: $(OBJS4)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o mandelbrot $(OBJS4)
fstring: $(OBJS5)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o fstring $(OBJS5)
calculator: $(OBJS5)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o calculator $(OBJS5)
timer: $(OBJS6)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o timer $(OBJS6)
fstring: $(OBJS6)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o fstring $(OBJS6)
ui: $(OBJS7)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o ui $(OBJS7)
timer: $(OBJS7)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o timer $(OBJS7)
ui: $(OBJS8)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o ui $(OBJS8)
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -W -Wall -pedantic"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic"
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"
.PHONY: clean dep
clean:
$(RM) $(PROGS) $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJ6) .depend *~
$(RM) $(PROGS) $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJ7) $(OBJS8) .depend *~
dep:
$(CXX) -MM $(INCLUDES) *.cpp >.depend

View File

@ -83,8 +83,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = hello$(EXEEXT) dialog$(EXEEXT) input-dialog$(EXEEXT) \
mandelbrot$(EXEEXT) fstring$(EXEEXT) timer$(EXEEXT) \
ui$(EXEEXT)
mandelbrot$(EXEEXT) calculator$(EXEEXT) fstring$(EXEEXT) \
timer$(EXEEXT) ui$(EXEEXT)
subdir = test
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
@ -99,13 +99,16 @@ mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_dialog_OBJECTS = dialog.$(OBJEXT)
dialog_OBJECTS = $(am_dialog_OBJECTS)
dialog_LDADD = $(LDADD)
am_calculator_OBJECTS = calculator.$(OBJEXT)
calculator_OBJECTS = $(am_calculator_OBJECTS)
calculator_LDADD = $(LDADD)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
am_dialog_OBJECTS = dialog.$(OBJEXT)
dialog_OBJECTS = $(am_dialog_OBJECTS)
dialog_LDADD = $(LDADD)
am_fstring_OBJECTS = fstring.$(OBJEXT)
fstring_OBJECTS = $(am_fstring_OBJECTS)
fstring_LDADD = $(LDADD)
@ -158,12 +161,12 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
am__v_CXXLD_0 = @echo " CXXLD " $@;
am__v_CXXLD_1 =
SOURCES = $(dialog_SOURCES) $(fstring_SOURCES) $(hello_SOURCES) \
$(input_dialog_SOURCES) $(mandelbrot_SOURCES) $(timer_SOURCES) \
$(ui_SOURCES)
DIST_SOURCES = $(dialog_SOURCES) $(fstring_SOURCES) $(hello_SOURCES) \
$(input_dialog_SOURCES) $(mandelbrot_SOURCES) $(timer_SOURCES) \
$(ui_SOURCES)
SOURCES = $(calculator_SOURCES) $(dialog_SOURCES) $(fstring_SOURCES) \
$(hello_SOURCES) $(input_dialog_SOURCES) $(mandelbrot_SOURCES) \
$(timer_SOURCES) $(ui_SOURCES)
DIST_SOURCES = $(calculator_SOURCES) $(dialog_SOURCES) \
$(fstring_SOURCES) $(hello_SOURCES) $(input_dialog_SOURCES) \
$(mandelbrot_SOURCES) $(timer_SOURCES) $(ui_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@ -316,6 +319,7 @@ hello_SOURCES = hello.cpp
dialog_SOURCES = dialog.cpp
input_dialog_SOURCES = input-dialog.cpp
mandelbrot_SOURCES = mandelbrot.cpp
calculator_SOURCES = calculator.cpp
fstring_SOURCES = fstring.cpp
timer_SOURCES = timer.cpp
ui_SOURCES = ui.cpp
@ -363,6 +367,10 @@ clean-noinstPROGRAMS:
echo " rm -f" $$list; \
rm -f $$list
calculator$(EXEEXT): $(calculator_OBJECTS) $(calculator_DEPENDENCIES) $(EXTRA_calculator_DEPENDENCIES)
@rm -f calculator$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(calculator_OBJECTS) $(calculator_LDADD) $(LIBS)
dialog$(EXEEXT): $(dialog_OBJECTS) $(dialog_DEPENDENCIES) $(EXTRA_dialog_DEPENDENCIES)
@rm -f dialog$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(dialog_OBJECTS) $(dialog_LDADD) $(LIBS)
@ -397,6 +405,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calculator.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstring.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hello.Po@am__quote@