add c example to makefile and fix "make clean"

This commit is contained in:
Haneef Mubarak 2014-11-27 15:06:12 -08:00
parent 9c34d5e361
commit d7f5ccb0c2

View file

@ -2,7 +2,7 @@ include ../build_config.mk
.PHONY: clean .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 simple_example: simple_example.cc
$(CXX) $(CXXFLAGS) $@.cc -o$@ ../librocksdb.a -I../include -O2 -std=c++11 $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) $(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 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) $(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 simple_example-c:
rm -rf ./simple_example ./column_families_example ./compact_files_example $(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