From d7f5ccb0c27fa5cd869a6bf822d887a2dd956f69 Mon Sep 17 00:00:00 2001 From: Haneef Mubarak Date: Thu, 27 Nov 2014 15:06:12 -0800 Subject: [PATCH] add c example to makefile and fix "make clean" --- examples/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index ce43785e0..10d5fe190 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,7 +2,7 @@ include ../build_config.mk .PHONY: clean -all: simple_example column_families_example compact_files_example +all: simple_example column_families_example compact_files_example simple_example-c simple_example: simple_example.cc $(CXX) $(CXXFLAGS) $@.cc -o$@ ../librocksdb.a -I../include -O2 -std=c++11 $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) @@ -13,5 +13,8 @@ column_families_example: column_families_example.cc compact_files_example: compact_files_example.cc $(CXX) $(CXXFLAGS) $@.cc -o$@ ../librocksdb.a -I../include -O2 -std=c++11 $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) -clean: simple_example column_families_example compact_files_example - rm -rf ./simple_example ./column_families_example ./compact_files_example +simple_example-c: + $(CXX) $(CXXFLAGS) -xc $@.c -o$@ ../librocksdb.a -I../include -O2 $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) + +clean: + rm -rf ./simple_example ./column_families_example ./compact_files_example ./simple_example-c