~ubuntu-branches/ubuntu/trusty/netrek-client-cow/trusty

« back to all changes in this revision

Viewing changes to .pc/004-honor-flags.patch/system.mk.in

  • Committer: Bazaar Package Importer
  • Author(s): Peter Pentchev, Barry deFreese, Peter Pentchev, Evgeni Golov
  • Date: 2011-05-11 14:13:39 UTC
  • Revision ID: james.westby@ubuntu.com-20110511141339-zbeophhjymz5ef8l
Tags: 3.3.0-2
* Team upload.

[ Barry deFreese ]
* Some packaging changes suggested by upstream.
  + Update package description.
  + Update debian/netrek-client-cow.6.
* Bump Standards Version to 3.8.3. (No changes needed).

[ Peter Pentchev ]
* Add the 001-configure-gmp-version patch to fix the check for
  libgmp versions larger than 1.  Closes: #620528
* Convert to the 3.0 (quilt) source format:
  - add the 002-make-reallyclean patch to really clean up after
    the build.
  - drop the build dependency on quilt
  - drop the quilt invocations from the rules file
* Add the 003-typos patch to fix some typographical and grammatical
  errors.
* Bump Standards-Version to 3.9.2 with no changes.
* Let the build system honor CPPFLAGS, CFLAGS and LDFLAGS
  - export them in the rules file
  - add the 004-honor-flags patch
* Minimize the rules file using debhelper override targets.
* Use dh --with autotools_dev to handle config.guess and config.sub.
* Bump the debhelper compatibility level to 8 with no changes.
* Depend on libgmp-dev instead of libgmp3-dev.
* Use dpkg-buildflags to obtain the default values for CPPFLAGS,
  CFLAGS and LDFLAGS.
* Pass --as-needed to the linker to avoid unneeded dependencies.
* Convert the copyright file to the latest DEP 5 candidate format
  and add my copyright notice.
* Build with -Werror if the "werror" build option is specified.
* Harden the build unless the "nohardening" build option is specified.
* Remove the 001_desktop_file patch that has not been applied ever
  since Barry deFreese's fix in rev. 9851.

[ Evgeni Golov ]
* Fix some typos in the Description.
  Closes: #624019

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
############################################################################
 
2
# System dependend defines, we try to guess this values.
 
3
# Change them if we are wrong.
 
4
############################################################################
 
5
 
 
6
SHELL   = /bin/sh
 
7
CC      = @CC@
 
8
LN      = @LN_S@
 
9
 
 
10
PROTOIZE   = protoize
 
11
UNPROTOIZE = unprotoize
 
12
INDENT     = indent -i2 -bap -bacc -bad -nbc -bl -nip -di8\
 
13
                -npsl -nce -cli0.5 -ci4 -npcs -fca -ncdb -sc -cd50 -c50
 
14
TOUCH      = touch
 
15
RM         = rm -f 
 
16
 
 
17
# Directory to find multiprecision library and includes. 
 
18
# if you  don't have libmp.a you are probably hosed .. but it's easy to 
 
19
# get gmp from the GNU people. 
 
20
#
 
21
 
 
22
RSA_FLAGS       = @NORSA@ -DRSA
 
23
RSASRC          = @NORSA@ rsa_box.c rsa_box_0.c rsa_box_1.c rsa_box_2.c \
 
24
                rsa_box_3.c rsa_box_4.c rsa_box_5.c rsa_box_6.c \
 
25
                rsa_box_7.c rsa_box_8.c rsa_box_9.c rsa_box_10.c
 
26
RSAOBJ          = @NORSA@ rsa_box.o rsa_box_0.o rsa_box_1.o rsa_box_2.o \
 
27
                rsa_box_3.o rsa_box_4.o rsa_box_5.o rsa_box_6.o \
 
28
                rsa_box_7.o rsa_box_8.o rsa_box_9.o rsa_box_10.o
 
29
MPINC           = @MPINC@
 
30
LMP             = @MPLIB@
 
31
 
 
32
# Other libraries neeeded. (All systems need -lX11 -lm)
 
33
 
 
34
LIBS            = @LIBS@ 
 
35
INCS            = @INCS@
 
36
 
 
37
# Flags for optimizing
 
38
# (-O, -g, -O2)
 
39
 
 
40
OPT             = -g -Wall
 
41
 
 
42
# Flags for shared libraries
 
43
 
 
44
SL_CFLAGS       = -fPIC
 
45
SL_LDFLAGS      = -shared $(LIBRARIES) -lc 
 
46
SL_LIB          = libcow.so.`./name 1`
 
47
SL_LIBFLAGS     = -Wl,-soname,$(SL_LIB)
 
48
 
 
49
COWAPI          = cowapi.h
 
50
COWLIB          = libcow.so.`./name 1`.`./name 2`.`./name p`
 
51
COWDLL          = cow.so
 
52
 
 
53
# random.c  Some arches don't have random(), we will compile it if necessary
 
54
# set RANDOMOBJ = random.o if you need this, otherwise leave it blank.
 
55
 
 
56
RANDOMOBJ       = @LIBOBJS@
 
57
 
 
58
###############################################################################
 
59
#  No editables below this point.
 
60
###############################################################################
 
61
 
 
62
 
 
63
include $(KEYDEF)
 
64
 
 
65
 
 
66
ROBJ            = check.o colors.o data.o death.o defaults.o dmessage.o\
 
67
                  enter.o findslot.o getname.o getship.o helpwin.o inform.o\
 
68
                  interface.o newwin.o option.o planetlist.o macrowin.o\
 
69
                  map.o playerlist.o ranklist.o reserved.o sintab.o\
 
70
                  smessage.o socket.o playback.o stats.o util.o war.o warning.o\
 
71
                  udpopt.o ping.o pingstats.o rotate.o lagmeter.o parsemeta.o\
 
72
                  netstat.o netstatopt.o spopt.o dashboard.o dashboard3.o \
 
73
                  short.o distress.o senddist.o defwin.o tools.o sound.o\
 
74
                  docwin.o cflags.o beeplite.o feature.o\
 
75
                  string_util.o local.o censor.o cowmain.o camera.o myf.o
 
76
 
 
77
RSRC            = check.c colors.c data.c death.c defaults.c dmessage.c\
 
78
                  enter.c findslot.c getname.c getship.c helpwin.c inform.c\
 
79
                  input.c interface.c newwin.c option.c planetlist.c\
 
80
                  macrowin.c map.c playerlist.c ranklist.c redraw.c\
 
81
                  smessage.c parsemeta.c socket.c playback.c stats.c util.c war.c\
 
82
                  warning.c udpopt.c sintab.c ping.c pingstats.c rotate.c\
 
83
                  lagmeter.c netstat.c netstatopt.c spopt.c dashboard.c dashboard3.c \
 
84
                  short.c distress.c senddist.c defwin.c tools.c sound.c\
 
85
                  docwin.c cflags.c beeplite.c feature.c reserved.c\
 
86
                  string_util.c local.c censor.c cowmain.c camera.c myf.c
 
87
 
 
88
 
 
89
INCLUDES        = struct.h packets.h defs.h copyright.h bitmaps.h data.h\
 
90
                  oldbitmaps.h tngbitmaps.h hullbitmaps.h rabbitbitmaps.h\
 
91
                  sound.h audio.h litebitmaps.h 
 
92
 
 
93
INPUTOBJ        = input.o redraw.o 
 
94
MAINOBJ         = main.o
 
95
MAINSRC         = main.c
 
96
 
 
97
X11OBJ          = @NOX11@ x11window.o x11sprite.o audio.o
 
98
X11SRC          = @NOX11@ x11window.c x11sprite.c audio.c
 
99
 
 
100
WIN32OBJ        = @NOWIN32@ gnu_win32.o winsprite.o winsndlib.o
 
101
WIN32SRC        = @NOWIN32@ gnu_win32.c winsprite.c winsndlib.c
 
102
 
 
103
SDL_CFLAGS      = @SDL_CFLAGS@
 
104
SDL_CONFIG      = @SDL_CONFIG@
 
105
SDL_LIBS        = @SDL_LIBS@
 
106
SDL_MIXER_LIBS  = @SDL_MIXER_LIBS@
 
107
 
 
108
# full screen support
 
109
XXF86VM_LIBS    = -lXxf86vm
 
110
# camera snapshot support
 
111
IMLIB2_LIBS     = $(shell imlib2-config --libs)
 
112
 
 
113
SHARED  = $(SL_CFLAGS)
 
114
INCDIRS = $(MPINC) $(INCS)
 
115
CFLAGS = $(OPT) $(EXTRACFLAGS) $(RSA_FLAGS) $(INCDIRS)
 
116
LFLAGS = -g $(EXTRALINKFLAGS)
 
117
LIBRARIES = $(LMP) $(LIBS) $(EXTRALIBS) $(SDL_LIBS) $(SDL_MIXER_LIBS) $(XXF86VM_LIBS) $(IMLIB2_LIBS)
 
118
 
 
119
netrek-client-cow: $(RSAOBJ) $(PMAKE) null $(ROBJ) $(MAINOBJ) $(INPUTOBJ) $(X11OBJ) $(WIN32OBJ)  $(RANDOMOBJ) cflags.c
 
120
        $(CC) $(LFLAGS) -o netrek-client-cow $(ROBJ) $(RSAOBJ) $(INPUTOBJ) \
 
121
        $(MAINOBJ) $(X11OBJ) $(WIN32OBJ) $(RANDOMOBJ) $(LIBRARIES)
 
122
 
 
123
netrek.shared: done.libcow $(MAINOBJ) $(COWAPI)
 
124
        $(CC) $(LFLAGS) $(MAINOBJ) -L. -lcow $(LIBS) -o netrek.shared
 
125
 
 
126
done.libcow: $(PMAKE) $(ROBJ) $(RSAOBJ) $(INPUTOBJ) $(X11OBJ) $(WIN32OBJ) $(RANDOMOBJ) 
 
127
        $(CC) $(ROBJ) $(RSAOBJ) $(INPUTOBJ) \
 
128
        $(X11OBJ) $(WIN32OBJ) $(RANDOMOBJ) $(SL_LDFLAGS) $(SL_LIBFLAGS) -o $(COWLIB)
 
129
        $(RM) $(SL_LIB)
 
130
        $(LN) $(COWLIB) $(SL_LIB)
 
131
        $(TOUCH) done.libcow
 
132
 
 
133
#rsa_box.c: mkkey $(SECKEYFILE)
 
134
$(RSASRC): mkkey $(SECKEYFILE)
 
135
        -$(RM) $(RSASRC)
 
136
        ./mkkey -c -k $(SECKEYFILE)
 
137
        $(TOUCH) $(RSASRC)
 
138
        @echo "int sock = -1;" >>rsa_box_1.c
 
139
 
 
140
$(SECKEYFILE):
 
141
        @echo generating a new client key
 
142
        $(MAKE) newkey
 
143
 
 
144
mkkey: mkkey.c $(RANDOMOBJ) defs.h
 
145
        $(CC) $(CFLAGS) $(MPINC) $(MPLIB) -o mkkey mkkey.c $(RANDOMOBJ) $(LIBRARIES)
 
146
 
 
147
randomize: randomize.c $(RANDOMOBJ) defs.h
 
148
        $(CC) $(OPT) -o randomize randomize.c $(RANDOMOBJ) $(LIBRARIES)
 
149
 
 
150
sound.o: sound.c
 
151
        $(CC) $(SDL_CFLAGS) -c sound.c
 
152
 
 
153
random.o: random.c
 
154
        $(CC) -c -O random.c
 
155
 
 
156
strdup.o: strdup.c
 
157
        $(CC) -c -O strdup.c
 
158
 
 
159
cflags.c: mkcflags
 
160
        ./mkcflags "$(CC) $(CFLAGS)" "$(ARCH)"  > cflags.c
 
161
        echo char cwho[]=$(CWHO)\; >> cflags.c
 
162
 
 
163
mkcflags: mkcflags.c system.mk null patchlevel.h version.h
 
164
        $(CC) $(CFLAGS) -o mkcflags mkcflags.c $(LIBRARIES)
 
165
 
 
166
tags: $(RSRC) $(RSASRC)
 
167
        ctags $(RSRC) $(RSASRC) $(INCLUDES)
 
168
 
 
169
depend: cflags.c null $(RSASRC)
 
170
        -makedepend -f system.mk $(RSA_FLAGS) $(RSRC) $(RSASRC) $(MAINSRC) \
 
171
        $(X11SRC) name.c $(INCDIRS)
 
172
 
 
173
proto: cflags.c null $(RSASRC)
 
174
        $(PROTOIZE) $(RSRC) $(MAINSRC) $(X11SRC) $(WIN32SRC)
 
175
 
 
176
unproto: cflags.c null $(RSASRC)
 
177
        $(UNPROTOIZE) $(RSRC) $(MAINSRC) $(X11SRC) $(WIN32SRC)
 
178
 
 
179
indent: cflags.c null $(RSASRC)
 
180
        $(INDENT) $(RSRC) $(MAINSRC) $(INCLUDES) $(X11SRC) $(WIN32SRC)
 
181
 
 
182
to_unix: $(RSRC) $(INCLUDES) $(MAINSRC) $(X11SRC)
 
183
        -for f in $(RSRC) $(INCLUDES) $(MAINSRC) $(X11SRC) $(WIN32SRC) ; do \
 
184
        mv $${f} $${f}.bak ; win32/uncr < $${f}.bak > $${f} ;\
 
185
        done
 
186
 
 
187
to_dos: $(RSRC) $(INCLUDES) $(MAINSRC) $(X11SRC) $(WIN32SRC)
 
188
        -for f in $(RSRC) $(INCLUDES) $(MAINSRC) $(X11SRC) $(WIN32SRC) ; do \
 
189
        mv $${f} $${f}.bak ; win32/cr < $${f}.bak >$${f} ;\
 
190
        done
 
191
 
 
192
null:
 
193
        @echo "/* This file is intentionally empty */" >null
 
194
 
 
195
xtrekrc:
 
196
        @grep '^int' data.c \
 
197
        | grep '=' \
 
198
        | sed -e 's/;.*//' \
 
199
        | awk 'NF==4{print $$2,$$4}' > xtrekrc.tmp
 
200
        @egrep '(booleanDefault|intDefault)' $(RSRC) $(MAINSRC) $(X11SRC) $(WIN32SRC) \
 
201
        | grep  '\"' \
 
202
        | sed -e '{s/[(]/ /g;s/[)]/ /g;s/\"//;s/\"/:/;s/, */ /;s/ *;.*//;}' \
 
203
              -e '/intDefault/{s/^.*intDefault */<int> /;}' \
 
204
              -e '/booleanDefault/{s/^.*booleanDefault */<bool> /;}' \
 
205
        | awk 'NF==3{print $$3,$$2,$$1}' >> xtrekrc.tmp
 
206
        @sort -u xtrekrc.tmp \
 
207
        | awk 'NF==2{var=$$1;value=$$2} \
 
208
               NF==3{if (length($$1)<=2)\
 
209
                        {print "#       "$$2,$$1}\
 
210
                     else if (var==$$1)\
 
211
                        {print "#       "$$2,value}\
 
212
                     else\
 
213
                        {print "#       "$$2,$$3};}' > xtrekrc.tmp1
 
214
        @grep 'getdefault' $(RSRC) $(MAINSRC) $(X11SRC) $(WIN32SRC) \
 
215
        | grep  '\"' \
 
216
        | sed -e '{s|^.*getdefault[^\"]*\"|#    |;s|\".*|: <string>|;}' \
 
217
        >> xtrekrc.tmp1
 
218
        @echo '# Automatic created xtrekrc with default values' \
 
219
        > xtrekrc
 
220
        @sort -u xtrekrc.tmp1\
 
221
        >> xtrekrc
 
222
        -$(RM) xtrekrc.tmp*
 
223
 
 
224
# DO NOT DELETE THIS LINE -- make depend depends on it.
 
225