Changeset 110

Show
Ignore:
Timestamp:
06/18/06 20:57:56 (6 years ago)
Author:
tg
Message:

* build mkfs.jffs2 on bsd (untested if it's usable)
* sprinkle a few $(HOSTCC) and $(HOSTCFLAGS)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/target/linux/image/jffs2/Makefile

    r1 r110  
    1313        zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) -xvf - 
    1414        $(PATCH) $(MTD_DIR) ./patches 
     15        cd $(TOPDIR)/scripts && cp byteswap.h endian.h param.h \ 
     16            $(MTD_DIR)/include/ 
     17        cp $(TOPDIR)/scripts/getline.c $(MTD_DIR)/util/ 
    1518        touch $(MTD_DIR)/.unpacked 
    1619 
  • trunk/freewrt/toolchain/utils/Makefile

    r100 r110  
    2121         
    2222$(UTILS_BUILD_DIR)/%: src/%.c 
    23         $(CC) -o $@ $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@) 
     23        $(HOSTCC) -I $(TOPDIR)/scripts $(HOSTCFLAGS) -o $@ \ 
     24            $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@) 
    2425        chmod 755 $@ 
    25  
  • trunk/freewrt/toolchain/utils/src/trx.c

    r52 r110  
    1818 */ 
    1919 
     20#include <param.h> 
    2021#include <stdio.h> 
    2122#include <stdlib.h> 
     
    2526#include <errno.h> 
    2627#include <unistd.h> 
    27 #if defined(__APPLE__) 
    28 #include <machine/endian.h> 
    29 #include <machine/byte_order.h> 
    30 #define __BYTE_ORDER BYTE_ORDER 
    31 #define __BIG_ENDIAN BIG_ENDIAN 
    32 #define bswap_16(x) NXSwapShort(x) 
    33 #define bswap_32(x) NXSwapInt(x) 
    34 #define bswap_64(x) NXSwapLongLong(x) 
    35 #elif defined(__OpenBSD__) 
    36 #include <machine/endian.h> 
    37 #define bswap_16(x) swap16(x) 
    38 #define bswap_32(x) swap32(x) 
    39 #define bswap_64(x) swap64(x) 
    40 #else 
     28#include <byteswap.h> 
    4129#include <endian.h> 
    42 #include <byteswap.h> 
    43 #endif 
    4430 
    4531#if __BYTE_ORDER == __BIG_ENDIAN