]> 4ch.mooo.com Git - 16.git/blob - src/lib/doslib/ext/zlib/common.mak
d1a12f22115e61b94f19cc836b8c5f2bd8f37d49
[16.git] / src / lib / doslib / ext / zlib / common.mak
1 # this makefile is included from all the dos*.mak files, do not use directly
2 # NTS: HPS is either \ (DOS) or / (Linux)
3 NOW_BUILDING = EXT_ZLIB_LIB
4 CFLAGS_THIS = -fr=nul -fo=$(SUBDIR)$(HPS).obj -i=.. -i..$(HPS).. -dHAVE_CONFIG_H -dSTDC
5
6 OBJS = $(SUBDIR)$(HPS)adler32.obj $(SUBDIR)$(HPS)compress.obj $(SUBDIR)$(HPS)crc32.obj $(SUBDIR)$(HPS)deflate.obj $(SUBDIR)$(HPS)gzclose.obj $(SUBDIR)$(HPS)gzlib.obj $(SUBDIR)$(HPS)gzread.obj $(SUBDIR)$(HPS)gzwrite.obj $(SUBDIR)$(HPS)infback.obj $(SUBDIR)$(HPS)inffast.obj $(SUBDIR)$(HPS)inflate.obj $(SUBDIR)$(HPS)inftrees.obj $(SUBDIR)$(HPS)trees.obj $(SUBDIR)$(HPS)uncompr.obj $(SUBDIR)$(HPS)zutil.obj
7
8 !ifdef EXT_ZLIB_MINIGZIP_EXE
9 $(EXT_ZLIB_MINIGZIP_EXE): $(EXT_ZLIB_LIB) $(SUBDIR)$(HPS)minigzip.obj
10         %write tmp.cmd option quiet system $(WLINK_SYSTEM) file $(SUBDIR)$(HPS)minigzip.obj library $(EXT_ZLIB_LIB) name $(EXT_ZLIB_MINIGZIP_EXE)
11         @wlink @tmp.cmd
12         @$(COPY) ..$(HPS)..$(HPS)dos32a.dat $(SUBDIR)$(HPS)dos4gw.exe
13 !endif
14
15 !ifdef EXT_ZLIB_EXAMPLE_EXE
16 $(EXT_ZLIB_EXAMPLE_EXE): $(EXT_ZLIB_LIB) $(SUBDIR)$(HPS)example.obj
17         %write tmp.cmd option quiet system $(WLINK_SYSTEM) file $(SUBDIR)$(HPS)example.obj library $(EXT_ZLIB_LIB) name $(EXT_ZLIB_EXAMPLE_EXE)
18         @wlink @tmp.cmd
19         @$(COPY) ..$(HPS)..$(HPS)dos32a.dat $(SUBDIR)$(HPS)dos4gw.exe
20 !endif
21
22 !ifndef EXT_ZLIB_LIB_NO_LIB
23 $(EXT_ZLIB_LIB): $(OBJS)
24         wlib -q -b -c $(EXT_ZLIB_LIB) -+$(SUBDIR)$(HPS)adler32.obj -+$(SUBDIR)$(HPS)compress.obj -+$(SUBDIR)$(HPS)crc32.obj -+$(SUBDIR)$(HPS)deflate.obj -+$(SUBDIR)$(HPS)gzclose.obj -+$(SUBDIR)$(HPS)gzlib.obj -+$(SUBDIR)$(HPS)gzread.obj -+$(SUBDIR)$(HPS)gzwrite.obj -+$(SUBDIR)$(HPS)infback.obj -+$(SUBDIR)$(HPS)inffast.obj -+$(SUBDIR)$(HPS)inflate.obj -+$(SUBDIR)$(HPS)inftrees.obj -+$(SUBDIR)$(HPS)trees.obj -+$(SUBDIR)$(HPS)uncompr.obj -+$(SUBDIR)$(HPS)zutil.obj
25 !endif
26
27 # NTS we have to construct the command line into tmp.cmd because for MS-DOS
28 # systems all arguments would exceed the pitiful 128 char command line limit
29 .C.OBJ:
30         %write tmp.cmd $(CFLAGS_THIS) $(CFLAGS) $[@
31         @$(CC) @tmp.cmd
32
33 all: lib exe .symbolic
34        
35 lib: $(EXT_ZLIB_LIB) .symbolic
36
37 exe: $(EXT_ZLIB_MINIGZIP_EXE) $(EXT_ZLIB_EXAMPLE_EXE) .symbolic
38
39 clean: .SYMBOLIC
40           del $(SUBDIR)$(HPS)*.obj
41           del tmp.cmd
42           @echo Cleaning done
43