< prev index next >

make/gensrc/GensrcBuffer.gmk

Print this page




 213 
 214   $1_DEP := $$($1_SRC)
 215   ifneq ($$($1_BIN), 1)
 216     $1_DEP := $$($1_SRC)
 217     $1_OUT := $$($1_DST)
 218   else
 219     $1_DEP += $$($1_SRC) $$($1_SRC_BIN)
 220     $1_OUT := $(GENSRC_BUFFER_DST)/$1.binop.0.java
 221   endif
 222 
 223   ifeq ($$($1_BIN), 1)
 224     $(call genBinOps,$1_char,char,$$($1_BO),$$($1_RW),two,one)
 225     $(call genBinOps,$1_short,short,$$($1_BO),$$($1_RW),two,one)
 226     $(call genBinOps,$1_int,int,$$($1_BO),$$($1_RW),four,three)
 227     $(call genBinOps,$1_long,long,$$($1_BO),$$($1_RW),eight,seven)
 228     $(call genBinOps,$1_float,float,$$($1_BO),$$($1_RW),four,three)
 229     $(call genBinOps,$1_double,double,$$($1_BO),$$($1_RW),eight,seven)
 230   endif
 231 
 232   $$($1_DST): $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
 233         $(RM) $$($1_OUT).tmp
 234         $(TOOL_SPP) -i$$($1_SRC) -o$$($1_OUT).tmp \
 235             -K$$($1_type) \
 236             -K$$($1_category) \
 237             -K$$($1_streams) \
 238             -Dtype=$$($1_type) \
 239             -DType=$$($1_Type) \
 240             -Dfulltype=$$($1_fulltype) \
 241             -DFulltype=$$($1_Fulltype) \
 242             -Dstreamtype=$$($1_streamtype) \
 243             -DStreamtype=$$($1_Streamtype) \
 244             -Dx=$$($1_x) \
 245             -Dmemtype=$$($1_memtype) \
 246             -DMemtype=$$($1_Memtype) \
 247             -DSwaptype=$$($1_Swaptype) \
 248             -DfromBits=$$($1_fromBits) \
 249             -DtoBits=$$($1_toBits) \
 250             -DLG_BYTES_PER_VALUE=$$($1_LBPV) \
 251             -DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
 252             -DBO=$$($1_BO) \
 253             -Dswap=$$($1_swap) \
 254             -DRW=$$($1_RW) \
 255             -K$$($1_rwkey) \
 256             -Da=$$($1_a) \
 257             -DA=$$($1_A) \
 258             -Kbo$$($1_BO)
 259         $(MV) $$($1_OUT).tmp $$($1_OUT)
 260         # Do the extra bin thing
 261         ifeq ($$($1_BIN), 1)
 262           $(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).tmp
 263           $(RM) $$($1_OUT)
 264           $$($1_char_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
 265           $$($1_short_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
 266           $$($1_int_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
 267           $$($1_long_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
 268           $$($1_float_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
 269           $$($1_double_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
 270           $(PRINTF) "}\n" >> $$($1_DST).tmp
 271           mv $$($1_DST).tmp $$($1_DST)
 272         endif
 273 
 274   GENSRC_BUFFER += $$($1_DST)
 275 
 276 endef
 277 
 278 ###
 279 
 280 X_BUF := X-Buffer
 281 
 282 $(eval $(call SetupGenBuffer,ByteBuffer,  $(X_BUF), type:=byte, BIN:=1))
 283 $(eval $(call SetupGenBuffer,CharBuffer,  $(X_BUF), type:=char))
 284 $(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF), type:=short))
 285 $(eval $(call SetupGenBuffer,IntBuffer,   $(X_BUF), type:=int))
 286 $(eval $(call SetupGenBuffer,LongBuffer,  $(X_BUF), type:=long))
 287 $(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF), type:=float))
 288 $(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF), type:=double))
 289 




 213 
 214   $1_DEP := $$($1_SRC)
 215   ifneq ($$($1_BIN), 1)
 216     $1_DEP := $$($1_SRC)
 217     $1_OUT := $$($1_DST)
 218   else
 219     $1_DEP += $$($1_SRC) $$($1_SRC_BIN)
 220     $1_OUT := $(GENSRC_BUFFER_DST)/$1.binop.0.java
 221   endif
 222 
 223   ifeq ($$($1_BIN), 1)
 224     $(call genBinOps,$1_char,char,$$($1_BO),$$($1_RW),two,one)
 225     $(call genBinOps,$1_short,short,$$($1_BO),$$($1_RW),two,one)
 226     $(call genBinOps,$1_int,int,$$($1_BO),$$($1_RW),four,three)
 227     $(call genBinOps,$1_long,long,$$($1_BO),$$($1_RW),eight,seven)
 228     $(call genBinOps,$1_float,float,$$($1_BO),$$($1_RW),four,three)
 229     $(call genBinOps,$1_double,double,$$($1_BO),$$($1_RW),eight,seven)
 230   endif
 231 
 232   $$($1_DST): $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
 233         $(TOOL_SPP) < $$($1_SRC) > $$($1_OUT).tmp \

 234             -K$$($1_type) \
 235             -K$$($1_category) \
 236             -K$$($1_streams) \
 237             -Dtype=$$($1_type) \
 238             -DType=$$($1_Type) \
 239             -Dfulltype=$$($1_fulltype) \
 240             -DFulltype=$$($1_Fulltype) \
 241             -Dstreamtype=$$($1_streamtype) \
 242             -DStreamtype=$$($1_Streamtype) \
 243             -Dx=$$($1_x) \
 244             -Dmemtype=$$($1_memtype) \
 245             -DMemtype=$$($1_Memtype) \
 246             -DSwaptype=$$($1_Swaptype) \
 247             -DfromBits=$$($1_fromBits) \
 248             -DtoBits=$$($1_toBits) \
 249             -DLG_BYTES_PER_VALUE=$$($1_LBPV) \
 250             -DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
 251             -DBO=$$($1_BO) \
 252             -Dswap=$$($1_swap) \
 253             -DRW=$$($1_RW) \
 254             -K$$($1_rwkey) \
 255             -Da=$$($1_a) \
 256             -DA=$$($1_A) \
 257             -Kbo$$($1_BO)
 258         $(MV) $$($1_OUT).tmp $$($1_OUT)
 259         # Do the extra bin thing
 260         ifeq ($$($1_BIN), 1)
 261           $(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).tmp
 262           $(RM) $$($1_OUT)
 263           $$($1_char_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
 264           $$($1_short_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
 265           $$($1_int_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
 266           $$($1_long_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
 267           $$($1_float_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
 268           $$($1_double_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
 269           $(PRINTF) "}\n" >> $$($1_DST).tmp
 270           mv $$($1_DST).tmp $$($1_DST)
 271         endif
 272 
 273   GENSRC_BUFFER += $$($1_DST)
 274 
 275 endef
 276 
 277 ###
 278 
 279 X_BUF := X-Buffer
 280 
 281 $(eval $(call SetupGenBuffer,ByteBuffer,  $(X_BUF), type:=byte, BIN:=1))
 282 $(eval $(call SetupGenBuffer,CharBuffer,  $(X_BUF), type:=char))
 283 $(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF), type:=short))
 284 $(eval $(call SetupGenBuffer,IntBuffer,   $(X_BUF), type:=int))
 285 $(eval $(call SetupGenBuffer,LongBuffer,  $(X_BUF), type:=long))
 286 $(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF), type:=float))
 287 $(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF), type:=double))
 288 


< prev index next >