#!/usr/bin/env omake
#----------------------------------------------------------------------------
# Project:  Horizon
# File:     OMakefile
#
# Copyright (C)2009-2012 Nintendo Co., Ltd.  All rights reserved.
#
# These coded instructions, statements, and computer programs contain
# proprietary information of Nintendo of America Inc. and/or Nintendo
# Company Ltd., and are protected by Federal copyright law.  They may
# not be disclosed to third parties or copied or duplicated in any form,
# in whole or in part, without the prior written consent of Nintendo.
#
# $Rev: 46365 $
#----------------------------------------------------------------------------
SUPPORTED_TARGETS   =   CTR-T*.Process.MPCore.*

SOURCES[]           =   main.cpp

TARGET_PROGRAM      =   UncompressBlz

ROMFS_ROOT          =   romfiles

# Compress data using ctr_compress, and include it in ROMFS
COMPRESS            =   $(CTRSDK_ROOT)/tools/CommandLineTools/ctr_compress32.exe
public.CompressFile(input, output, opt) =
    IN_PATH         =   $(ROMFS_ROOT)/$(input)
    OUT_PATH        =   $(ROMFS_ROOT)/$(output)
    $(OUT_PATH): $(IN_PATH) $(COMPRESS)
        $(COMPRESS) -s -$(opt) -o $(OUT_PATH) $(IN_PATH) 
    return $(OUT_PATH)
ROMFS_FILES         =   $(CompressFile data.bin, archive.bin, lb)
ROMFS_DEPENDENCIES  =   $(ROMFS_FILES)

# NN_LOG output is performed even with the Release build
DEBUG_PRINT         =   true

include $(ROOT_OMAKE)/modulerules

build: $(DEFAULT_TARGETS)
