File: Makefile.noimake

package info (click to toggle)
freeciv 1.5.2-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,612 kB
  • ctags: 2,887
  • sloc: ansic: 26,147; makefile: 66; sh: 35
file content (154 lines) | stat: -rwxr-xr-x 4,605 bytes parent folder | download
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
143
144
145
146
147
148
149
150
151
152
153
154
# Makefile for Freeciv
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


# If you for some reason don't want to use Imake, then try this Makefile.
# The only parts you probably want to change are the XPM related lines
# below, and the architecture specific lines.

#
# defs
#
CC=gcc

XPM_INCLUDE_DIR=-I/usr/include/X11

#XPM_INCLUDE_DIR=-I/usr/X11R6/include/X11

#Example of how to do it if the Xpm library is installed in a non-standard
#directory, such as a user account:
#XPM_INCLUDE_DIR=-I/users/pjunold/xpm-3.4i/lib
#XPM_LIB_DIR=-L/users/pjunold/xpm-3.4i/lib

XINCLUDE_DIR=/usr/X11R6/include
INCLUDE_DIR=include
XLIB_DIR=/usr/X11R6/lib


#
# Compile flags
#

# linux
CFLAGS=-c -g  -Wall -I$(INCLUDE_DIR) -I$(XINCLUDE_DIR) $(XPM_INCLUDE_DIR)
#irix cc compiler
#CFLAGS=-c -fullwarn -j -woff 835 -g -ansi -I$(INCLUDE_DIR) $(XPM_INCLUDE_DIR)
#CFLAGS=-c -fullwarn -j -g -ansi -I$(INCLUDE_DIR) $(XPM_INCLUDE_DIR)
# sunos
#CFLAGS=-c -g -Wall -ansi -I$(INCLUDE_DIR) $(XPM_INCLUDE_DIR)

#
# Client link flags
#

# linux/irix
CLFLAGS=-g -L$(XLIB_DIR) $(XPM_LIB_DIR) -lXpm -lXmu -lXaw -lXt -lX11
# sunos
#CLFLAGS=-L/usr/X11/lib $(XPM_LIB_DIR) -lXpm -lXaw -lXt -lXmu -lX11 -lsocket
#hpux
#CLFLAGS=-L/usr/X11/lib $(XPM_LIB_DIR) -lXpm -lXmu -lXext -lXaw -lXt -lX11

#
# Server link flags
#

# linux/irix
SLFLAGS=
# sunos
#SLFLAGS=-lsocket


SERVER_OBJS= common/map.o server/civserver.o common/game.o \
             common/unit.o common/tech.o common/city.o common/log.o \
             server/sernet.o common/packets.o common/shared.o \
             common/genlist.o common/registry.o common/player.o \
             server/unithand.o server/maphand.o server/stdinhand.o \
	     server/cityhand.o server/plrhand.o \
	     server/handchat.o \
	     server/gamehand.o server/gotohand.o server/diplhand.o \
	     common/diptreaty.o common/mapgen.o server/meta.o \
	     ai/aihand.o ai/aitools.o ai/aicity.o ai/aiunit.o ai/aitech.o \
	     ai/advleader.o ai/advmilitary.o ai/advtrade.o ai/advscience.o \
	     ai/advdomestic.o ai/advforeign.o ai/advattitude.o ai/advisland.o

CLIENT_OBJS= client/civclient.o \
	     common/log.o client/xmain.o client/canvas.o client/menu.o \
	     client/colors.o client/graphics.o common/map.o client/mapview.o \
	     client/chatline.o client/clinet.o common/packets.o \
             client/dialogs.o common/shared.o common/unit.o common/player.o \
             common/game.o common/genlist.o common/registry.o  \
             client/plrdlg.o client/mapctrl.o common/city.o client/citydlg.o \
	     common/tech.o client/repodlgs.o client/ratesdlg.o \
	     client/xstuff.o client/inputdlg.o client/finddlg.o \
	     client/helpdlg.o client/diplodlg.o common/diptreaty.o \
	     client/pixcomm.o client/optiondlg.o client/messagedlg.o \
	     client/messagewin.o client/inteldlg.o \
	     client/resources.o client/climisc.o client/packhand.o \
	     client/gotodlg.o client/connectdlg.o

#client/soundhand.o

#
# rules
#
all: civclient civserver

civclient: $(CLIENT_OBJS)
	$(CC) -w -o  civclient $(CLIENT_OBJS)  $(CLFLAGS)

civserver: $(SERVER_OBJS)
	$(CC) -w -o  civserver $(SERVER_OBJS)  $(SLFLAGS)

include/Freeciv.h: data/Freeciv
	client/ad2c data/Freeciv >include/Freeciv.h

client/resources.o: include/Freeciv.h
	$(CC) $(CFLAGS) -o client/resources.o client/resources.c 

client/helpdlg.o: client/helpdlg.c

.c.o:
	$(CC) $(CFLAGS) -o $*.o $<

clean:
	rm -f *~ *# civserver civclient \
           server/*~ server/*# server/*.o \
           ai/*~ ai/*# ai/*.o \
	   client/*~ client/*# client/*.o \
	   include/*~ include/*# \
	   common/*~ common/*# common/*.o \
           data/*~ data/*# data/*.o  *.sav
	rm -f client/.#* server/.#* common/.#* .#*

realclean: clean
#	rm -rf CVS client/CVS server/CVS common/CVS

wc:
	wc client/*.c common/*.c include/*.h server/*.c ai/*.c data/Freeciv

tgz: clean
	tar -cvf - * | gzip -9 >freeciv.tgz

tgZ: clean
	tar -cvf ../freeciv.tar *
	compress ../freeciv.tar

tags:
	rm -f TAGS
	ctags -a client/*.c include/*.h