File: Makefile.studio.mingw

package info (click to toggle)
exult 1.2-4
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 9,040 kB
  • ctags: 10,543
  • sloc: cpp: 99,373; sh: 8,333; ansic: 4,659; makefile: 988; yacc: 769; lex: 313; xml: 19
file content (120 lines) | stat: -rw-r--r-- 4,397 bytes parent folder | download | duplicates (8)
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
# Exult Studio makefile for use in Windows with mingw using GCC 3.2 and msys shell
# The shell IS required! 

# Where is Exult Studio will be installed. 
U7PATH=C:/Ultima7
# Only used for snapshots
STUDIOPATH=C:/Studio
TOOLSPATH=C:/GimpPlugin

SRC=.
VPATH=$(SRC):$(SRC)/files:$(SRC)/shapes:$(SRC)/imagewin:$(SRC)/mapedit:$(SRC)/server:$(SRC)/objs:$(SRC)/conf

# If this doesn't work, insert output of `pkg-config --cflags gtk+-win32-2.0` manually
GTK_INCLUDES = `pkg-config --cflags gtk+-win32-2.0`
# If this doesn't work, insert output of `pkg-config --libs gtk+-win32-2.0` manually
GTK_LIBS = `pkg-config --libs gtk+-win32-2.0`

# If this doesn't work, insert output of 'pkg-config --cflags libglade-2.0' manually
LIBGLADE_INCLUDES = `pkg-config --cflags libglade-2.0`
# If this doesn't work, insert output of 'pkg-config --libs libglade-2.0' manually
LIBGLADE_LIBS = `pkg-config --libs libglade-2.0`

# If this doesn't work, insert output of 'pkg-config --cflags freetype2' manually
FREETYPE2_INCLUDES = `pkg-config --cflags freetype2`
# If this doesn't work, insert output of 'pkg-config --libs freetype2' manually
FREETYPE2_LIBS = `pkg-config --libs freetype2`

# If this doesn't work, insert output of 'pkg-config --cflags gimp-2.0' manually
GIMP_INCLUDES = `pkg-config --cflags gimp-2.0`
# If this doesn't work, insert output of 'pkg-config --libs gimp-2.0' manually
GIMP_LIBS = `pkg-config --libs gimp-2.0`

INCLUDES= -I$(SRC) -I$(SRC)/shapes -I$(SRC)/mapedit -I$(SRC)/imagewin \
	-I$(SRC)/files -I$(SRC)/headers -I$(SRC)/server -I$(SRC)/objs -I$(SRC)/conf $(GTK_INCLUDES) $(LIBGLADE_INCLUDES) $(FREETYPE2_INCLUDES) $(GIMP_INCLUDES)

CPPFLAGS= -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DEXULT_DATADIR=\"data\" -DUSE_EXULTSTUDIO -DHAVE_PNG_H -DHAVE_FREETYPE2 $(INCLUDES)

CXXFLAGS= -O2 -mms-bitfields -DHAVE_EXT_HASH_MAP -DHAVE_EXT_HASH_SET -DHAVE_SSTREAM
CXX=g++

CFLAGS= -O2 -mms-bitfields
CC=gcc

LIBS=$(GTK_LIBS) $(LIBGLADE_LIBS) $(FREETYPE2_LIBS) -liberty -lole32 -lpng -luuid -lz -mwindows
EXEC=exult_studio.exe
EXP_FILE=exult_studio.exp

SERVER_OBJS=objserial.o servemsg.o servewin32.o

MAPEDIT_OBJS=chunklst.o combo.o eggedit.o compile.o execbox.o exult_studio.o locator.o npcedit.o \
	objbrowse.o objedit.o paledit.o shapedraw.o shapefile.o shapegroup.o \
	shapeedit.o shapelst.o studio.o

FILES_OBJS=Flat.o Flex.o IFF.o listfiles.o msgfile.o Table.o U7file.o utils.o

IMAGEWIN_OBJS=ibuf8.o imagebuf.o

SHAPES_OBJS=font.o fontgen.o fontvga.o items.o pngio.o monstinf.o shapeinf.o shapevga.o shapewrite.o u7drag.o vgafile.o

CONF_OBJS=Configuration.o XMLEntity.o

MISC_OBJS=exultstudioico.o windrag.o

OBJS=$(MAPEDIT_OBJS) $(FILES_OBJS) $(IMAGEWIN_OBJS) $(SHAPES_OBJS) $(SERVER_OBJS) $(CONF_OBJS) $(MISC_OBJS)

$(EXEC): $(OBJS) $(EXP_FILE)
	$(CXX) $(EXP_FILE) -o $@ $(OBJS) $(LIBS)

$(EXP_FILE): $(OBJS)
	dlltool --output-exp $@ $(OBJS) -D $(EXEC)

exultstudioico.o: $(SRC)/win32/exultstudioico.rc $(SRC)/win32/exultstudio.ico
	windres --include-dir $(SRC)/win32 $(SRC)/win32/exultstudioico.rc $@

u7shp.exe : u7shp.o
	$(CXX) -o $(@) $+ $(GTK_LIBS) $(GIMP_LIBS) -mwindows

allclean: clean

clean:
	rm -f $(OBJS) $(EXP_FILE) $(EXEC) u7shp.exe u7shp.o

install: $(EXEC)
	mkdir -p $(U7PATH)
	strip $(EXEC) -o $(U7PATH)/$(EXEC)
	mkdir -p $(U7PATH)/data
	cp mapedit/exult_studio.glade $(U7PATH)/data
	mkdir -p $(U7PATH)/data/estudio
	mkdir -p $(U7PATH)/data/estudio/new
	cp data/estudio/new/*.flx $(U7PATH)/data/estudio/new
	cp data/estudio/new/*.vga $(U7PATH)/data/estudio/new
	cp data/estudio/new/*.shp $(U7PATH)/data/estudio/new

tools: u7shp.exe

toolsinstall: tools
	strip u7shp.exe -o $(HOME)/u7shp.exe

toolsdist: tools
	mkdir -p $(TOOLSPATH)
	strip u7shp.exe -o $(TOOLSPATH)/u7shp.exe
	cp mapedit/gimpwin32.txt $(TOOLSPATH)
	u2d $(TOOLSPATH)/*.txt

dist: $(EXEC)
	mkdir -p $(STUDIOPATH)
	strip $(EXEC) -o  $(STUDIOPATH)/$(EXEC)
	mkdir -p $(STUDIOPATH)/data
	cp docs/exult_studio.html $(STUDIOPATH)
	cp docs/exult_studio.txt $(STUDIOPATH)
	mkdir -p $(STUDIOPATH)/images
	cp docs/images/*.gif $(STUDIOPATH)/images
	cp docs/images/studio*.png $(STUDIOPATH)/images
	cp mapedit/exult_studio.glade $(STUDIOPATH)/data
	mkdir -p $(STUDIOPATH)/data/estudio
	mkdir -p $(STUDIOPATH)/data/estudio/new
	cp data/estudio/new/*.flx $(STUDIOPATH)/data/estudio/new
	cp data/estudio/new/*.vga $(STUDIOPATH)/data/estudio/new
	cp data/estudio/new/*.shp $(STUDIOPATH)/data/estudio/new
	u2d $(STUDIOPATH)/*.txt