Subversion Repositories SvarDOS

Rev

Rev 2235 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
221 mateuszvis 1
#
268 mateuszvis 2
# pkg Makefile -- requires OpenWatcom (wmake)
1684 mateusz.vi 3
# Copyright (C) 2021-2024 Mateusz Viste
221 mateuszvis 4
#
5
 
2235 bernd.boec 6
!ifdef __UNIX__
7
SEP=/
8
MV = mv
9
CP = cp
10
!else
11
SEP=\
12
MV = move /Y
13
CP = copy
14
!endif
15
 
16
TLUMACZ = ..$(SEP)svarlang.lib$(SEP)tlumacz.exe
17
 
18
CFLAGS = -q -0 -mc -os -wx -we -d0 -i=zlib
1507 mateusz.vi 19
LDFLAGS = -lr -fe=pkg.exe -fm=pkg.map
2235 bernd.boec 20
LIBS = zlib/zlib_c.lib svarlang.lib/svarlngc.lib
221 mateuszvis 21
 
268 mateuszvis 22
all: pkg.exe
221 mateuszvis 23
 
275 mateuszvis 24
release: pkg.exe .symbolic
2235 bernd.boec 25
	rm -f pkg.zip
26
	rm -f pkg.svp
275 mateuszvis 27
	mkdir appinfo
28
	mkdir bin
1879 mateusz.vi 29
	mkdir doc
2236 bernd.boec 30
	$(CP) pkg.lng bin
31
	$(CP) pkg.exe bin
32
	$(CP) pkg.lsm appinfo
33
	$(CP) pkg.txt doc
1879 mateusz.vi 34
	zip -9moDkrX pkg.svp appinfo bin doc
35
	zip -9oDkrX pkg.zip nls_utf8 svarlang.lib zlib *.c *.h pkg.txt pkg.lsm makefile
302 mateuszvis 36
	rmdir appinfo
37
	rmdir bin
1879 mateusz.vi 38
	rmdir doc
275 mateuszvis 39
 
1965 mateusz.vi 40
pkg.exe: main.obj healthck.obj crc32.obj fileexst.obj helpers.obj inf.obj libunzip.obj loadconf.obj lsm.obj pkginst.obj pkgrem.obj trim.obj showinst.obj unzip.obj deflang.obj
221 mateuszvis 41
	wcl $(LDFLAGS) $(LIBS) *.obj
2235 bernd.boec 42
	upx --8086 --best pkg.exe
221 mateuszvis 43
 
2235 bernd.boec 44
deflang.obj: nls_utf8/pkg_??.txt
613 mateuszvis 45
	cd nls_utf8
2235 bernd.boec 46
	rm -f ??.txt
47
	$(CP) pkg_en.txt en.txt
2234 bernd.boec 48
	utf8tocp 850 pkg_br.txt br.txt
49
	utf8tocp 850 pkg_de.txt de.txt
50
	utf8tocp 850 pkg_fr.txt fr.txt
51
	utf8tocp 850 pkg_dk.txt dk.txt
52
	utf8tocp 852 pkg_si.txt si.txt
53
	utf8tocp 857 pkg_tr.txt tr.txt
54
	utf8tocp maz pkg_pl.txt pl.txt
2235 bernd.boec 55
	$(TLUMACZ) en br de fr dk si tr pl > tlumacz.log
56
	$(MV) out.lng ..$(SEP)pkg.lng
57
	$(MV) deflang.c ..
58
	rm -f ??.txt
613 mateuszvis 59
	cd ..
2235 bernd.boec 60
	wcc $(CFLAGS) -fo=deflang.obj deflang.c
244 mateuszvis 61
 
2235 bernd.boec 62
 
221 mateuszvis 63
main.obj: main.c
2235 bernd.boec 64
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 65
 
66
crc32.obj: crc32.c
2235 bernd.boec 67
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 68
 
69
fileexst.obj: fileexst.c
2235 bernd.boec 70
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 71
 
1959 mateusz.vi 72
healthck.obj: healthck.c
2235 bernd.boec 73
	wcc $(CFLAGS) -fo=$*.obj $[@
1959 mateusz.vi 74
 
221 mateuszvis 75
helpers.obj: helpers.c
2235 bernd.boec 76
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 77
 
78
inf.obj: inf.c
2235 bernd.boec 79
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 80
 
81
libunzip.obj: libunzip.c
2235 bernd.boec 82
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 83
 
84
loadconf.obj: loadconf.c
2235 bernd.boec 85
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 86
 
87
lsm.obj: lsm.c
2235 bernd.boec 88
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 89
 
90
pkginst.obj: pkginst.c
2235 bernd.boec 91
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 92
 
93
pkgrem.obj: pkgrem.c
2235 bernd.boec 94
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 95
 
256 mateuszvis 96
trim.obj: trim.c
2235 bernd.boec 97
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 98
 
99
showinst.obj: showinst.c
2235 bernd.boec 100
	wcc $(CFLAGS) -fo=$*.obj $[@
221 mateuszvis 101
 
296 mateuszvis 102
unzip.obj: unzip.c
2235 bernd.boec 103
	wcc $(CFLAGS) -fo=$*.obj $[@
296 mateuszvis 104
 
221 mateuszvis 105
clean: .symbolic
2232 bernd.boec 106
	rm -f *.obj
107
	rm -f pkg.exe
2236 bernd.boec 108
	rm -f pkg.svp
109
	rm -f pkg.zip
2232 bernd.boec 110
	rm -f pkg.lng
111
	rm -f pkg.map
112
	rm -f deflang.c
2235 bernd.boec 113
	rm -f nls_utf8/tlumacz.log
2232 bernd.boec 114