properly compile ckcache.ci when int16 is supported.
[charm.git] / src / libs / ck-libs / cache / Makefile
1 include ../common.mk
2
3 LIB = libmoduleCkCache.a
4 LIBOBJ = CkCache.o
5
6 HEADERS = $(CDIR)/include/CkCache.decl.h \
7           $(CDIR)/include/CkCache.def.h \
8           $(CDIR)/include/CkCache.h 
9 LIBDEST =  $(LIBDIR)/$(LIB)
10
11 CIFILES = CkCache.ci
12
13 all: $(LIBDEST) $(HEADERS)
14
15 $(LIBDEST): $(LIBOBJ)
16         $(CHARMC) -o $(LIBDEST) $(LIBOBJ) 
17
18 CkCache.def.h CkCache.decl.h: INTERFACE
19
20 BUILD_INT16=$(shell CHARMINC=../../../; if test -f ../../../conv-config.sh; then . ./conv-config.sh; echo $$CMK_HAS_INT16; fi )
21
22 ifneq "$(BUILD_INT16)" "0"
23 CHARMXI_FLAGS += -DCMK_HAS_INT16=1
24 endif
25
26 INTERFACE: $(CIFILES)
27         $(CHARMC) -E $(CHARMXI_FLAGS) -c CkCache.ci
28         touch INTERFACE
29
30 CkCache.o: CkCache.C $(HEADERS)
31         $(CHARMC) -I../../.. -c -o CkCache.o CkCache.C
32
33 clean:
34         rm -f conv-host *.o *.decl.h *.def.h core  $(LIB) INTERFACE
35
36 realclean: clean
37         rm -f $(LIBDEST) $(HEADERS)