xz-analysis-mirror/dos/Makefile

150 lines
4.4 KiB
Makefile
Raw Permalink Normal View History

2009-02-13 11:23:50 -05:00
###############################################################################
#
# Makefile to build XZ Utils using DJGPP
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
###############################################################################
# For debugging, set comment "#define NDEBUG 1" from config.h to enable
# the assert() macro, set STRIP=rem to disable stripping, and finally
# e.g. CFLAGS="-g -O0".
2009-02-13 11:23:50 -05:00
CC = gcc
STRIP = strip
CPPFLAGS =
CFLAGS = -g -Wall -Wextra -Wfatal-errors -march=i386 -mtune=i686 -O2
LDFLAGS = -lemu
2009-02-13 11:23:50 -05:00
ALL_CFLAGS = -std=gnu99
2009-02-13 11:23:50 -05:00
ALL_CPPFLAGS = \
-I. \
-I../lib \
-I../src/common \
-I../src/liblzma/api \
-I../src/liblzma/common \
-I../src/liblzma/check \
-I../src/liblzma/rangecoder \
-I../src/liblzma/lz \
-I../src/liblzma/lzma \
-I../src/liblzma/delta \
-I../src/liblzma/simple \
-DHAVE_CONFIG_H
2009-02-13 11:23:50 -05:00
ALL_CPPFLAGS += $(CPPFLAGS)
ALL_CFLAGS += $(CFLAGS)
.PHONY: all
all: xz.exe
2009-02-13 11:23:50 -05:00
SRCS_C = \
../lib/getopt.c \
../lib/getopt1.c \
../src/common/tuklib_cpucores.c \
../src/common/tuklib_exit.c \
../src/common/tuklib_mbstr_fw.c \
../src/common/tuklib_mbstr_width.c \
../src/common/tuklib_open_stdxxx.c \
../src/common/tuklib_physmem.c \
../src/common/tuklib_progname.c \
../src/liblzma/check/check.c \
../src/liblzma/check/crc32_table.c \
../src/liblzma/check/crc64_table.c \
../src/liblzma/check/sha256.c \
2009-02-13 11:23:50 -05:00
../src/liblzma/common/alone_decoder.c \
../src/liblzma/common/alone_encoder.c \
../src/liblzma/common/block_decoder.c \
../src/liblzma/common/block_encoder.c \
../src/liblzma/common/block_header_decoder.c \
../src/liblzma/common/block_header_encoder.c \
../src/liblzma/common/block_util.c \
../src/liblzma/common/common.c \
../src/liblzma/common/file_info.c \
2009-02-13 11:23:50 -05:00
../src/liblzma/common/filter_common.c \
../src/liblzma/common/filter_decoder.c \
../src/liblzma/common/filter_encoder.c \
../src/liblzma/common/filter_flags_decoder.c \
../src/liblzma/common/filter_flags_encoder.c \
../src/liblzma/common/hardware_physmem.c \
2009-02-13 11:23:50 -05:00
../src/liblzma/common/index.c \
../src/liblzma/common/index_decoder.c \
../src/liblzma/common/index_encoder.c \
../src/liblzma/common/index_hash.c \
../src/liblzma/common/lzip_decoder.c \
2009-02-13 11:23:50 -05:00
../src/liblzma/common/stream_decoder.c \
../src/liblzma/common/stream_encoder.c \
../src/liblzma/common/stream_flags_common.c \
../src/liblzma/common/stream_flags_decoder.c \
../src/liblzma/common/stream_flags_encoder.c \
../src/liblzma/common/string_conversion.c \
2009-02-13 11:23:50 -05:00
../src/liblzma/common/vli_decoder.c \
../src/liblzma/common/vli_encoder.c \
../src/liblzma/common/vli_size.c \
../src/liblzma/delta/delta_common.c \
../src/liblzma/delta/delta_decoder.c \
../src/liblzma/delta/delta_encoder.c \
2009-02-13 11:23:50 -05:00
../src/liblzma/lz/lz_decoder.c \
../src/liblzma/lz/lz_encoder.c \
../src/liblzma/lz/lz_encoder_mf.c \
../src/liblzma/lzma/fastpos_table.c \
../src/liblzma/lzma/lzma2_decoder.c \
../src/liblzma/lzma/lzma2_encoder.c \
../src/liblzma/lzma/lzma_decoder.c \
../src/liblzma/lzma/lzma_encoder.c \
../src/liblzma/lzma/lzma_encoder_optimum_fast.c \
../src/liblzma/lzma/lzma_encoder_optimum_normal.c \
../src/liblzma/lzma/lzma_encoder_presets.c \
../src/liblzma/rangecoder/price_table.c \
2009-02-13 11:23:50 -05:00
../src/liblzma/simple/arm.c \
../src/liblzma/simple/arm64.c \
2009-02-13 11:23:50 -05:00
../src/liblzma/simple/armthumb.c \
../src/liblzma/simple/ia64.c \
../src/liblzma/simple/powerpc.c \
../src/liblzma/simple/simple_coder.c \
../src/liblzma/simple/simple_decoder.c \
../src/liblzma/simple/simple_encoder.c \
../src/liblzma/simple/sparc.c \
../src/liblzma/simple/x86.c \
2009-02-13 11:23:50 -05:00
../src/xz/args.c \
../src/xz/coder.c \
../src/xz/file_io.c \
2009-02-13 11:23:50 -05:00
../src/xz/hardware.c \
../src/xz/list.c \
2009-02-13 11:23:50 -05:00
../src/xz/main.c \
../src/xz/message.c \
2014-12-21 13:48:37 -05:00
../src/xz/mytime.c \
2009-02-13 11:23:50 -05:00
../src/xz/options.c \
../src/xz/signals.c \
../src/xz/suffix.c \
../src/xz/util.c
SRCS_ASM = \
../src/liblzma/check/crc32_x86.S \
../src/liblzma/check/crc64_x86.S
OBJS_C = $(SRCS_C:.c=.o)
OBJS_ASM = $(SRCS_ASM:.S=.o)
OBJS = $(OBJS_C) $(OBJS_ASM)
getopt.h:
update ../lib/getopt.in.h getopt.h
2009-02-13 11:23:50 -05:00
$(OBJS): getopt.h
2009-02-13 11:23:50 -05:00
$(OBJS_C): %.o: %.c
2009-02-13 11:23:50 -05:00
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
$(OBJS_ASM): %.o: %.S
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
# Make xz.exe not depend on an external DPMI server.
xz.exe: $(OBJS)
$(CC) $(ALL_CFLAGS) $(OBJS) $(LDFLAGS) -o $@
2009-02-13 11:23:50 -05:00
$(STRIP) --strip-all $@
exe2coff $@
del $@
2009-02-13 11:23:50 -05:00
copy /b $(DJGPP:DJGPP.ENV=BIN\CWSDSTUB.EXE) + $(@:.exe=) $@
del $(@:.exe=)