tuklib_integer.h: Fix a recent copypaste error in Clang detection.
[xz/debian.git] / dos / Makefile
blob793adc1ceb346f3688ab73017ae0cfd3ca03911f
1 ###############################################################################
3 # Makefile to build XZ Utils using DJGPP
5 # Author: Lasse Collin
7 # This file has been put into the public domain.
8 # You can do whatever you want with this file.
10 ###############################################################################
12 # For debugging, set comment "#define NDEBUG 1" from config.h to enable
13 # the assert() macro, set STRIP=rem to disable stripping, and finally
14 # e.g. CFLAGS="-g -O0".
15 CC = gcc
16 STRIP = strip
17 CPPFLAGS =
18 CFLAGS = -g -Wall -Wextra -Wfatal-errors -march=i386 -mtune=i686 -O2
19 LDFLAGS = -lemu
21 ALL_CFLAGS = -std=gnu99
23 ALL_CPPFLAGS = \
24 -I. \
25 -I../lib \
26 -I../src/common \
27 -I../src/liblzma/api \
28 -I../src/liblzma/common \
29 -I../src/liblzma/check \
30 -I../src/liblzma/rangecoder \
31 -I../src/liblzma/lz \
32 -I../src/liblzma/lzma \
33 -I../src/liblzma/delta \
34 -I../src/liblzma/simple \
35 -DHAVE_CONFIG_H
37 ALL_CPPFLAGS += $(CPPFLAGS)
38 ALL_CFLAGS += $(CFLAGS)
40 .PHONY: all
41 all: xz.exe
43 SRCS_C = \
44 ../lib/getopt.c \
45 ../lib/getopt1.c \
46 ../src/common/tuklib_cpucores.c \
47 ../src/common/tuklib_exit.c \
48 ../src/common/tuklib_mbstr_fw.c \
49 ../src/common/tuklib_mbstr_width.c \
50 ../src/common/tuklib_open_stdxxx.c \
51 ../src/common/tuklib_physmem.c \
52 ../src/common/tuklib_progname.c \
53 ../src/liblzma/check/check.c \
54 ../src/liblzma/check/crc32_table.c \
55 ../src/liblzma/check/crc64_table.c \
56 ../src/liblzma/check/sha256.c \
57 ../src/liblzma/common/alone_decoder.c \
58 ../src/liblzma/common/alone_encoder.c \
59 ../src/liblzma/common/block_decoder.c \
60 ../src/liblzma/common/block_encoder.c \
61 ../src/liblzma/common/block_header_decoder.c \
62 ../src/liblzma/common/block_header_encoder.c \
63 ../src/liblzma/common/block_util.c \
64 ../src/liblzma/common/common.c \
65 ../src/liblzma/common/file_info.c \
66 ../src/liblzma/common/filter_common.c \
67 ../src/liblzma/common/filter_decoder.c \
68 ../src/liblzma/common/filter_encoder.c \
69 ../src/liblzma/common/filter_flags_decoder.c \
70 ../src/liblzma/common/filter_flags_encoder.c \
71 ../src/liblzma/common/hardware_physmem.c \
72 ../src/liblzma/common/index.c \
73 ../src/liblzma/common/index_decoder.c \
74 ../src/liblzma/common/index_encoder.c \
75 ../src/liblzma/common/index_hash.c \
76 ../src/liblzma/common/lzip_decoder.c \
77 ../src/liblzma/common/stream_decoder.c \
78 ../src/liblzma/common/stream_encoder.c \
79 ../src/liblzma/common/stream_flags_common.c \
80 ../src/liblzma/common/stream_flags_decoder.c \
81 ../src/liblzma/common/stream_flags_encoder.c \
82 ../src/liblzma/common/string_conversion.c \
83 ../src/liblzma/common/vli_decoder.c \
84 ../src/liblzma/common/vli_encoder.c \
85 ../src/liblzma/common/vli_size.c \
86 ../src/liblzma/delta/delta_common.c \
87 ../src/liblzma/delta/delta_decoder.c \
88 ../src/liblzma/delta/delta_encoder.c \
89 ../src/liblzma/lz/lz_decoder.c \
90 ../src/liblzma/lz/lz_encoder.c \
91 ../src/liblzma/lz/lz_encoder_mf.c \
92 ../src/liblzma/lzma/fastpos_table.c \
93 ../src/liblzma/lzma/lzma2_decoder.c \
94 ../src/liblzma/lzma/lzma2_encoder.c \
95 ../src/liblzma/lzma/lzma_decoder.c \
96 ../src/liblzma/lzma/lzma_encoder.c \
97 ../src/liblzma/lzma/lzma_encoder_optimum_fast.c \
98 ../src/liblzma/lzma/lzma_encoder_optimum_normal.c \
99 ../src/liblzma/lzma/lzma_encoder_presets.c \
100 ../src/liblzma/rangecoder/price_table.c \
101 ../src/liblzma/simple/arm.c \
102 ../src/liblzma/simple/arm64.c \
103 ../src/liblzma/simple/armthumb.c \
104 ../src/liblzma/simple/ia64.c \
105 ../src/liblzma/simple/powerpc.c \
106 ../src/liblzma/simple/simple_coder.c \
107 ../src/liblzma/simple/simple_decoder.c \
108 ../src/liblzma/simple/simple_encoder.c \
109 ../src/liblzma/simple/sparc.c \
110 ../src/liblzma/simple/x86.c \
111 ../src/xz/args.c \
112 ../src/xz/coder.c \
113 ../src/xz/file_io.c \
114 ../src/xz/hardware.c \
115 ../src/xz/list.c \
116 ../src/xz/main.c \
117 ../src/xz/message.c \
118 ../src/xz/mytime.c \
119 ../src/xz/options.c \
120 ../src/xz/signals.c \
121 ../src/xz/suffix.c \
122 ../src/xz/util.c
123 SRCS_ASM = \
124 ../src/liblzma/check/crc32_x86.S \
125 ../src/liblzma/check/crc64_x86.S
127 OBJS_C = $(SRCS_C:.c=.o)
128 OBJS_ASM = $(SRCS_ASM:.S=.o)
129 OBJS = $(OBJS_C) $(OBJS_ASM)
131 getopt.h:
132 update ../lib/getopt.in.h getopt.h
134 $(OBJS): getopt.h
136 $(OBJS_C): %.o: %.c
137 $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
139 $(OBJS_ASM): %.o: %.S
140 $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
142 # Make xz.exe not depend on an external DPMI server.
143 xz.exe: $(OBJS)
144 $(CC) $(ALL_CFLAGS) $(OBJS) $(LDFLAGS) -o $@
145 $(STRIP) --strip-all $@
146 exe2coff $@
147 del $@
148 copy /b $(DJGPP:DJGPP.ENV=BIN\CWSDSTUB.EXE) + $(@:.exe=) $@
149 del $(@:.exe=)