File: Imakefile

package info (click to toggle)
kdrill 6.5deb2-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,340 kB
  • sloc: ansic: 7,636; makefile: 47
file content (142 lines) | stat: -rw-r--r-- 4,210 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/* This is the file you should edit, before compiling.
 * You should not have to alter any other file. See
 * "INSTALL" for details on compiling
 *
 * The next few things are probably the only things you might
 * need to change.
 *
 * UNCOMPRESS: put your favourite  uncompress command in here.
 *   If you don't have gzip... get it!
 *   If you still won't.. well then you'll have to change the line
 *     to something that will uncompress the file to stdout
 *   You'll also have to change the UNCOMPRESSEXT to .Z, or whatever's
 *   appropriate to you.
 *
 * Note: If you don't choose to compress your dictionaries, for 
 * whatever reason.. that's okay.
 * If it doesn't have the UNCOMPRESSEXT extension, kdrill will assume
 * it is not compressed, and treat it as a plain file.
 */

/* You might need the full pathname to gzip. If you dont have it at all,
 * just leave this be. Or substitute with 'compress'. But you should
 * really get gzip, as appropriate
 */
UNCOMPRESS = gzip -d -c
UNCOMPRESSEXT = .gz

/* UNCOMPRESS = compress -d -c
 * UNCOMPRESSEXT = .Z
 */

/* You can change these here, and KDrill.ad will 
 * get created with the matching values. Yaaay!
 */
DICTLOCATION= /usr/local/lib/kanjidic.gz
EDICTLOCATION= /usr/local/lib/edict.gz
RADLOCATION= /usr/local/lib/radkfile

# If for some reason, the user prefs stuff isn't working for you, 
# and you can't compile, uncomment this
# I THINK X11R5 and newer should always support this, though.
# XrmFileFlag=-DNOXRMSAVE


# Where to install? This is an example.
# The system should pick some default for you.
# If you dont like it, uncomment this and use it as you like.
# This isn't compiled in anywhere, it's just a convenience thing.
# BINDIR = /usr/local/bin/X11



/******************************************************************
 *   Okay, halt, whoa, cease, desist, go no further...            *
 ******************************************************************/

DEPLIBS = XawClientDepLibs
LOCAL_LIBRARIES = XawClientLibs

COMPRESSDEFS = -DUNCOMPRESS='"$(UNCOMPRESS)"' \
		-DUNCOMPRESSEXT='"$(UNCOMPRESSEXT)"'


DICTDEFS = -DDICTLOCATION='"KDrill*kdictfile:	 $(DICTLOCATION)"'
EDICTDEFS = -DEDICTLOCATION='"KDrill*edictfile:	 $(EDICTLOCATION)"'
RADDEFS = -DRADLOCATION='"KDrill*radkfile:	 $(RADLOCATION)"'


/* 
 * I don't like putting <X11/...> for everything, so..
 */
INCLUDES = -I$(INCROOT)/X11

/*
 *  If you need to debug things, use this
 * CDEBUGFLAGS = -g -Wall -O -isystem $(INCROOT)/X11
 */

/*CDEBUGFLAGS = -g -Wall -O -isystem $(INCROOT)/X11 -Wno-unknown-pragmas*/

/* If you need to force use of gcc over cc, then use these lines
 * in addition to the one above:
 * CC = gcc
 * CCOPTIONS = 
 */

EXTRA_DEFINES = $(XrmFileFlag)


SRCS = main.c options.c readfile.c game.c init.c widgets.c grades.c \
	frequency.c mainwindow.c search.c log.c utils.c kanasearch.c \
	convert.c multikanji.c kanjisearch.c strokesearch.c \
	searchwidgets.c prefs.c badguess.c skipsearch.c learn.c timeout.c

OBJS = main.o options.o readfile.o game.o init.o widgets.o grades.o \
	frequency.o mainwindow.o search.o log.o utils.o kanasearch.o \
	convert.o multikanji.o kanjisearch.o strokesearch.o radsearch.o \
	searchwidgets.o prefs.o badguess.o skipsearch.o learn.o timeout.o

ComplexProgramTarget(kdrill)

SpecialObjectRule(utils.o,utils.c, $(COMPRESSDEFS) )
SpecialObjectRule(init.o,init.c, $(DICTDEFS) $(EDICTDEFS) $(RADDEFS) )
SpecialObjectRule(radsearch.o,radsearch.c, $(RADDEFS) )
InstallAppDefaults(KDrill)

AllTarget(KDrill.ad)
AllTarget(patchlevel.h)

KDrill.ad:	KDrill.ad-dist Imakefile Makefile
	sed -e "s:EDICTLOCATION:$(EDICTLOCATION):" \
	     -e "s:KDICTLOCATION:$(DICTLOCATION):" \
	     -e "s:RADLOCATION:$(RADLOCATION):" \
	< KDrill.ad-dist > $@

VERSION=6.5


main.o:	patchlevel.h

Makefile::	Imakefile

patchlevel.h: Imakefile
	sed "s/version-sed/$(VERSION)/" patchlevel.h-dist >$@

# SOLARIS pkg format


ARCH=`uname -p`
PKG=BOLTkdrl
PKGFILE=$(PKG)-$(ARCH).pkg

pkg:	kdrill
	sed s/VERSION-sed/$(VERSION)/ pkginfo-dist >pkginfo
	pkgmk -o -d /tmp -a $(ARCH)
	touch $(PKGFILE)
	pkgtrans -s /tmp $(PKGFILE) $(PKG)
	-rm -r /tmp/$(PKG)
	@echo package file is $(PKGFILE)

clean::
	$(RM) kdrill.log .kanjiusefile $(PKGFILE)