Skip to content

Instantly share code, notes, and snippets.

@jeffhung
Created May 4, 2014 01:02
Show Gist options
  • Save jeffhung/cf3adbc33c25016dffa6 to your computer and use it in GitHub Desktop.
Save jeffhung/cf3adbc33c25016dffa6 to your computer and use it in GitHub Desktop.
MODULES =# list of sub modules
MODULES += src/common
MODULES += src/myspn-apiserver
MODULES += src/myspn-idp
MODULES += src/myspn-portal
MODULES += src/myspn-topcve
MODULES += src/spn-secured-defaults
MODULES += src/redis
MODULES += src/php-redis
MODULES += src/jetty-wadi
MODULES += src/codeguy-Slim
MODULES += src/sqoop-cdh
TESTS =# test programs of libfoo
TESTS += tests/assert_test
TESTS += tests/atomic_count_test
TESTS += tests/circular_queue_test
TESTS += tests/clock_perf_trace_test
TESTS += tests/condition_test
TESTS += tests/cpp_func_name_test
.PHONY: clean
clean:
@for d in $(MODULES); do \
$(MAKE) --print-directory --directory=$$d clean; \
done;
.PHONY: build-tests
build-tests: $(TESTS)
define TEST_RULE
$(1): libfoo.a $(1).o
$(CXX) $(CXXFLAGS) -o $(1) $(1).o tests/test_main.cpp -Llib -lfoo $(LDFLAGS)
endef
$(foreach t,$(TESTS),$(eval $(call TEST_RULE,$(t))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment