OLD | NEW |
1 ############################################################################### | 1 ############################################################################### |
2 # | 2 # |
3 # Makefile to build XZ Utils using DJGPP | 3 # Makefile to build XZ Utils using DJGPP |
4 # | 4 # |
5 # Author: Lasse Collin | 5 # Author: Lasse Collin |
6 # | 6 # |
7 # This file has been put into the public domain. | 7 # This file has been put into the public domain. |
8 # You can do whatever you want with this file. | 8 # You can do whatever you want with this file. |
9 # | 9 # |
10 ############################################################################### | 10 ############################################################################### |
11 | 11 |
12 # For debugging, set comment "#define NDEBUG 1" from config.h to enable | 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 | 13 # the assert() macro, set STRIP=rem to disable stripping, and finally |
14 # e.g. CFLAGS="-g -O0". | 14 # e.g. CFLAGS="-g -O0". |
15 CC = gcc | 15 CC = gcc |
16 STRIP = strip | 16 STRIP = strip |
17 CPPFLAGS = | 17 CPPFLAGS = |
18 CFLAGS = -g -Wall -Wextra -Wfatal-errors -march=i386 -mtune=i686 -O2 | 18 CFLAGS = -g -Wall -Wextra -Wfatal-errors -march=i386 -mtune=i686 -O2 |
19 LDFLAGS = | 19 LDFLAGS = -lemu |
20 | 20 |
21 # NOTE: -fgnu89-inline is needed on DJGPP 2.04 beta and GCC >= 4.3.0 | 21 # NOTE: -fgnu89-inline is needed on DJGPP 2.04 beta and GCC >= 4.3.0 |
22 # because time.h uses GNU-style "extern inline". | 22 # because time.h uses GNU-style "extern inline". |
23 ALL_CFLAGS = -std=gnu99 -fgnu89-inline | 23 ALL_CFLAGS = -std=gnu99 -fgnu89-inline |
24 | 24 |
25 ALL_CPPFLAGS = \ | 25 ALL_CPPFLAGS = \ |
26 -I. \ | 26 -I. \ |
27 -I../lib \ | 27 -I../lib \ |
28 -I../src/common \ | 28 -I../src/common \ |
29 -I../src/liblzma/api \ | 29 -I../src/liblzma/api \ |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $< | 137 $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $< |
138 | 138 |
139 # Make xz.exe not depend on an external DPMI server. | 139 # Make xz.exe not depend on an external DPMI server. |
140 xz.exe: $(OBJS) | 140 xz.exe: $(OBJS) |
141 $(CC) $(ALL_CFLAGS) $(OBJS) $(LDFLAGS) -o $@ | 141 $(CC) $(ALL_CFLAGS) $(OBJS) $(LDFLAGS) -o $@ |
142 $(STRIP) --strip-all $@ | 142 $(STRIP) --strip-all $@ |
143 exe2coff $@ | 143 exe2coff $@ |
144 del $@ | 144 del $@ |
145 copy /b $(DJGPP:DJGPP.ENV=BIN\CWSDSTUB.EXE) + $(@:.exe=) $@ | 145 copy /b $(DJGPP:DJGPP.ENV=BIN\CWSDSTUB.EXE) + $(@:.exe=) $@ |
146 del $(@:.exe=) | 146 del $(@:.exe=) |
OLD | NEW |