# Makefile for building programs with whole-program interfile optimization
###################################################################################################
CFLAGS0 := -Wall -Werror -std=gnu99 -lpthread #-m32 -DNBD32
# Makefile for building programs with whole-program interfile optimization
###################################################################################################
CFLAGS0 := -Wall -Werror -std=gnu99 -lpthread #-m32 -DNBD32
MAP_SRCS := map/map.c map/list.c map/skiplist.c map/hashtable.c
haz_test_SRCS := $(RUNTIME_SRCS) test/haz_test.c
MAP_SRCS := map/map.c map/list.c map/skiplist.c map/hashtable.c
haz_test_SRCS := $(RUNTIME_SRCS) test/haz_test.c
txn_test_SRCS := $(RUNTIME_SRCS) $(MAP_SRCS) test/txn_test.c test/CuTest.c txn/txn.c
map_test1_SRCS := $(RUNTIME_SRCS) $(MAP_SRCS) test/map_test1.c
map_test2_SRCS := $(RUNTIME_SRCS) $(MAP_SRCS) test/map_test2.c test/CuTest.c
txn_test_SRCS := $(RUNTIME_SRCS) $(MAP_SRCS) test/txn_test.c test/CuTest.c txn/txn.c
map_test1_SRCS := $(RUNTIME_SRCS) $(MAP_SRCS) test/map_test1.c
map_test2_SRCS := $(RUNTIME_SRCS) $(MAP_SRCS) test/map_test2.c test/CuTest.c
# Also, when calculating dependencies -combine is removed from CFLAGS because of another bug
# in gcc. It chokes when -MM is used with -combine.
###################################################################################################
# Also, when calculating dependencies -combine is removed from CFLAGS because of another bug
# in gcc. It chokes when -MM is used with -combine.
###################################################################################################
gcc $(CFLAGS:-combine:) $(INCS) -MM -MT $@ $($*_SRCS) > output/$*.d
gcc $(CFLAGS) $(INCS) -combine -S -o $@.temp $($*_SRCS)
grep -v "^L[BFM]\|^LCF" $@.temp > $@
gcc $(CFLAGS:-combine:) $(INCS) -MM -MT $@ $($*_SRCS) > output/$*.d
gcc $(CFLAGS) $(INCS) -combine -S -o $@.temp $($*_SRCS)
grep -v "^L[BFM]\|^LCF" $@.temp > $@
###################################################################################################
# dummy rule for boostrapping dependency files
###################################################################################################
###################################################################################################
# dummy rule for boostrapping dependency files
###################################################################################################