| 1 |
# Set the following variable correctly (where is the UnitTest++ package?) |
| 2 |
UTESTPP_DIR = /home/igv/Code/UnitTest++ |
| 3 |
|
| 4 |
OFILES_COMMON = test_utils.o SerializableBase.o SerializableBaseReader.o \ |
| 5 |
SerializableDerivedA.o SerializableDerivedB.o \ |
| 6 |
SerializableDerivedC.o |
| 7 |
|
| 8 |
OTESTS_FAST = test_ClassId.o test_write_item.o test_ArchiveIO.o \ |
| 9 |
test_ColumnBuffer.o test_VarPack.o test_tupleIO.o \ |
| 10 |
test_ColumnPacker.o test_RowPacker.o test_CPBuffer.o \ |
| 11 |
test_forward_listIO.o test_unorderedIO.o test_inheritance.o \ |
| 12 |
test_valarrayIO.o test_compressedIO.o test_pseudoIO.o |
| 13 |
|
| 14 |
# OPTIMIZE = -g |
| 15 |
|
| 16 |
# Use the following switch to support C++11 features in g++ |
| 17 |
# OPTIMIZE = -g -std=c++0x |
| 18 |
OPTIMIZE = -std=c++11 -O3 |
| 19 |
|
| 20 |
INCLUDES = -I. -I.. -I$(UTESTPP_DIR)/src |
| 21 |
CPPFLAGS = $(OPTIMIZE) $(INCLUDES) -Wall -W -Werror -Wno-unused-parameter |
| 22 |
|
| 23 |
LIBS = -L../geners/.libs -lgeners -L$(UTESTPP_DIR) -lUnitTest++ \ |
| 24 |
-L/usr/lib64 -L/usr/local/lib -lbz2 -lz -lm |
| 25 |
|
| 26 |
%.o : %.cc |
| 27 |
g++ -c $(CPPFLAGS) -fPIC -MD $< -o $@ |
| 28 |
@sed -i 's,\($*\.o\)[:]*\(.*\),$@: $$\(wildcard\2\)\n\1:\2,g' $*.d |
| 29 |
|
| 30 |
all: fast fast_run |
| 31 |
|
| 32 |
fast: test_main.o $(OTESTS_FAST) $(OFILES_COMMON) |
| 33 |
rm -f $@ |
| 34 |
g++ $(OPTIMIZE) -fPIC -o $@ $^ $(LIBS) |
| 35 |
|
| 36 |
fast_run: fast |
| 37 |
./fast |
| 38 |
|
| 39 |
PROGRAMS = hugePack_col.cc hugePackRead_col.cc hugePack_row.cc \ |
| 40 |
hugePackRead_row.cc printCatalog.cc searchCatalog.cc |
| 41 |
|
| 42 |
BINARIES = $(PROGRAMS:.cc=) |
| 43 |
|
| 44 |
binaries: $(BINARIES) |
| 45 |
|
| 46 |
$(BINARIES): % : %.o $(OFILES_COMMON); g++ $(OPTIMIZE) -fPIC -o $@ $^ $(LIBS) |
| 47 |
|
| 48 |
clean: |
| 49 |
rm -f fast $(BINARIES) *.out core.* *.o *.d *~ *.gsbd *.gsbmf |
| 50 |
|
| 51 |
-include test_main.d |
| 52 |
-include $(OFILES_COMMON:.o=.d) |
| 53 |
-include $(OTESTS_FAST:.o=.d) |
| 54 |
-include $(PROGRAMS:.cc=.d) |