vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

Makefrag (987B)


      1 
      2 BZ2_CFLAGS := -DBZ_NO_STDIO
      3 
      4 # VX32 decoder
      5 BZ2_OBJS := \
      6 	$(addprefix vxa/bz2/, \
      7 		blocksort.vo \
      8 		huffman.vo \
      9 		crctable.vo \
     10 		randtable.vo \
     11 		compress.vo \
     12 		decompress.vo \
     13 		bzlib.vo \
     14 	)
     15 
     16 BZ2_TARGETS := vxa/bz2/dbz2 vxa/bz2/hdbz2 vxa/bz2/ebz2
     17 
     18 OBJDIRS += vxa/bz2
     19 CLEAN_FILES += $(BZ2_OBJS) $(BZ2_TARGETS)
     20 
     21 
     22 all: $(BZ2_TARGETS)
     23 
     24 
     25 # VXA-based bzip2 encoder and decoder
     26 vxa/bz2/%bz2: vxa/bz2/%bz2.vo vxa/bz2/libbz2.a $(CLIB_DEPS)
     27 	$(VX32_LD) -o $@ $(VX32_LDFLAGS) $< vxa/bz2/libbz2.a $(VX32_LDLIBS)
     28 
     29 vxa/bz2/libbz2.a: $(BZ2_OBJS)
     30 	$(VX32_AR) r $@ $(BZ2_OBJS)
     31 
     32 vxa/bz2/%.vo: vxa/bz2/%.c
     33 	$(VX32_CC) -c -o $@ $(VX32_CFLAGS) $(BZ2_CFLAGS) $<
     34 
     35 
     36 # Host version of bz2 decoder, for comparison and debugging
     37 BZ2_HDOBJS := vxa/bz2/dbz2.ho $(patsubst %.vo,%.ho,$(BZ2_OBJS))
     38 CLEAN_FILES += $(BZ2_HDOBJS) vxa/bz2/hdbz2
     39 
     40 vxa/bz2/hdbz2: $(BZ2_HDOBJS)
     41 	$(HOST_CC) -o $@ $(HOST_LDFLAGS) $(BZ2_HDOBJS)
     42 
     43 vxa/bz2/%.ho: vxa/bz2/%.c
     44 	$(HOST_CC) -c -o vxa/bz2/$*.ho $(HOST_CFLAGS) $(BZ2_CFLAGS) $<
     45