Skip to content

Commit

Permalink
Fixed example project
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrueger committed Feb 2, 2016
1 parent 582bc01 commit 1bfbf8f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 4 deletions.
5 changes: 4 additions & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
include build/system.mk
include build/core.mk

CC := clang
CXX := clang++

$(eval $(call SUBDIR, greetings))

Expand Down
1 change: 1 addition & 0 deletions examples/build
4 changes: 3 additions & 1 deletion examples/greetings/rules.mk → examples/greetings/build.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
include $(TOP)/build/header.mk

targets_$(d) := helloworld goodbyeworld
products_$(d) := helloworld goodbyeworld

helloworld_precompiled_header_$(d) := helloworld.hpp
helloworld_sources_$(d) := helloworld.cpp
helloworld_target_dir_$(d) := bin
helloworld_cxx_flags_$(d) := -O2
helloworld_ld_flags_$(d) :=

goodbyeworld_precompiled_header_$(d) := goodbyeworld.hpp
goodbyeworld_sources_$(d) := goodbyeworld.cpp
goodbyeworld_target_dir_$(d):= bin
goodbyeworld_cxx_flags_$(d) := -g -O0
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions examples/greetings/src/goodbyeworld.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// precompiled header for this project
// empty for this example, but you could add arbitrary header files here
File renamed without changes.
2 changes: 2 additions & 0 deletions examples/greetings/src/helloworld.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// precompiled header for this project
// empty for this example, but you could add arbitrary header files here
4 changes: 2 additions & 2 deletions footer.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define RECIPES
$$(__t)_objects_$(d) := $$($$(__t)_objects_$(d):%.c=%.o)
$$(__t)_objects_$(d) := $$($$(__t)_objects_$(d):%=$(BUILD_DIR)/$(d)/%)
$$(__t)_deps_$(d) := $$($$(__t)_sources_$(d):%.cpp=%.d)
$$(__t)_deps_$(d) := $$($$(__t)_deps_$(d):%.c=%.d)
$$(__t)_deps_$(d) := $$($$(__t)_deps_$(d):%.c=%.d)
$$(__t)_deps_$(d) += $$($$(__t)_precompiled_header_$(d):%.hpp=%.d)
$$(__t)_deps_$(d) := $$($$(__t)_deps_$(d):%=$(BUILD_DIR)/$(d)/%)
__odir := $(BUILD_DIR)/$(d)
Expand All @@ -24,7 +24,7 @@ define RECIPES
$$(__qtgt): ld_local_flags := $$($$(__t)_ld_flags_$(d))
$$(__odir)/%.hpp.pch: $(d)/src/%.hpp
$(PCH_RECIPE)
$$(__odir)/%.o: $(d)/src/%.cpp | $$(__odir) $$($$(__t)_pch_$(d))
$$(__odir)/%.o: $(d)/src/%.cpp | $$(__odir) $$(__odir)/%.hpp.pch
$(CXX_RECIPE)
$$(__odir)/%.o: $(d)/src/%.c | $$(__odir)
$(C_RECIPE)
Expand Down

0 comments on commit 1bfbf8f

Please sign in to comment.