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 $(LIB): all
debug: debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -W -Wall -pedantic" $(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic"
profile: profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg" $(MAKE) $(MAKEFILE) PROFILE="-pg"

View File

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

View File

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

View File

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

View File

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