~ubuntu-branches/ubuntu/trusty/glbsp/trusty

« back to all changes in this revision

Viewing changes to Makefile.xming

  • Committer: Bazaar Package Importer
  • Author(s): Darren Salt
  • Date: 2008-01-30 13:33:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080130133349-kgojg33vyiu8xbvp
Tags: 2.24-1
* New upstream release.
* Bumped the lib soname and the library package name due to one silly
  little binary incompatibility caused by changes in an exported struct.
  (Safe; nothing else currently in the archive has ever used libglbsp2.)
* Removed my patches since they're all applied upstream.
* Updated the list of documentation files.
* Build-time changes:
  - Switched from dh_movefiles to dh_install.
  - Updated my makefile to cope with upstream changes.
  - Corrected for debian-rules-ignores-make-clean-error.
  - Corrected for substvar-source-version-is-deprecated.
  - Link libglbsp, rather than glbsp, with libm and libz.
* Fixed shlibdeps. (Closes: #460387)
* Bumped standards version to 3.7.3 (no other changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#####################################################
 
2
#
 
3
# glBSP Makefile for Cross-Compiling Win32 binaries
 
4
#
 
5
# Targets:
 
6
#    libglbsp.a
 
7
#    glbsp.exe
 
8
#    glBSPX.exe
 
9
#    glbsp.txt
 
10
#
 
11
#    all     : makes the library, cmdline program and docs
 
12
#    clean   : removes targets and intermediate files
 
13
#
 
14
 
 
15
LIB_NAME=libglbsp.a
 
16
CMD_NAME=glbsp.exe
 
17
GUI_NAME=glBSPX.exe
 
18
DOC_NAME=glbsp.txt
 
19
 
 
20
CC=i586-mingw32msvc-gcc
 
21
CXX=i586-mingw32msvc-g++
 
22
AR=i586-mingw32msvc-ar rc
 
23
RANLIB=i586-mingw32msvc-ranlib
 
24
STRIP=i586-mingw32msvc-strip --strip-unneeded
 
25
WINDRES=i586-mingw32msvc-windres
 
26
 
 
27
BASE_FLAGS=-Wall -O2 -I./src -DWIN32 -DINLINE_G=inline
 
28
 
 
29
ZLIB_DIR=./zlib-1.2.3-win32
 
30
FLTK_DIR=./fltk-1.1.7-win32
 
31
 
 
32
 
 
33
# ----- GENERAL STUFF ----------------------------------------------
 
34
 
 
35
all:    $(LIB_NAME) $(CMD_NAME) $(DOC_NAME)
 
36
 
 
37
clean:
 
38
        rm -f $(LIB_NAME) $(CMD_NAME) $(GUI_NAME) $(DOC_NAME)
 
39
        rm -f src/*.o cmdline/*.o gui/*.o
 
40
        rm -f ./core ./ERRS ./gb_debug.txt 
 
41
 
 
42
.PHONY: all clean
 
43
 
 
44
 
 
45
# ----- LIBRARY ----------------------------------------------------
 
46
 
 
47
LIB_FLAGS=$(BASE_FLAGS) -I$(ZLIB_DIR)
 
48
 
 
49
LIB_OBJS=\
 
50
        src/analyze.o  \
 
51
        src/blockmap.o \
 
52
        src/glbsp.o    \
 
53
        src/level.o    \
 
54
        src/node.o     \
 
55
        src/reject.o   \
 
56
        src/seg.o      \
 
57
        src/system.o   \
 
58
        src/util.o     \
 
59
        src/wad.o
 
60
 
 
61
src/%.o: src/%.c
 
62
        $(CC) $(LIB_FLAGS) -c $^ -o $@
 
63
 
 
64
$(LIB_NAME): $(LIB_OBJS)
 
65
        $(AR) $@ $(LIB_OBJS)
 
66
        $(RANLIB) $@
 
67
 
 
68
 
 
69
# ----- CMDLINE PROGRAM ---------------------------------------------
 
70
 
 
71
CMD_FLAGS=$(BASE_FLAGS) -I$(ZLIB_DIR)
 
72
CMD_LIBS=$(ZLIB_DIR)/libz.a -lm
 
73
 
 
74
CMD_OBJS=cmdline/main.o cmdline/display.o  
 
75
 
 
76
cmdline/%.o: cmdline/%.c
 
77
        $(CC) $(CMD_FLAGS) -c $^ -o $@
 
78
 
 
79
$(CMD_NAME): $(LIB_NAME) $(CMD_OBJS)
 
80
        $(CC) $(CMD_FLAGS) $(CMD_OBJS) -o $@ $(LIB_NAME) $(CMD_LIBS)
 
81
        $(STRIP) $@
 
82
 
 
83
 
 
84
# ----- GUI PROGRAM ---------------------------------------------
 
85
 
 
86
FLTK_FLAGS=-I$(FLTK_DIR) -I$(FLTK_DIR)/zlib
 
87
FLTK_LIBS=-L$(FLTK_DIR)/lib \
 
88
          -lfltk_images -lfltk_png -lfltk_z -lfltk_jpeg -lfltk
 
89
 
 
90
WIN32_LIBS=-mwindows -lole32 -luuid -lgdi32 -lcomctl32 \
 
91
           -lwsock32 -lsupc++
 
92
 
 
93
GUI_FLAGS=$(BASE_FLAGS) $(FLTK_FLAGS)
 
94
GUI_LIBS=$(FLTK_LIBS) $(WIN32_LIBS) -lm
 
95
 
 
96
GUI_OBJS=\
 
97
        gui/main.o     \
 
98
        gui/about.o    \
 
99
        gui/book.o     \
 
100
        gui/booktext.o \
 
101
        gui/cookie.o   \
 
102
        gui/dialog.o   \
 
103
        gui/files.o    \
 
104
        gui/helper.o   \
 
105
        gui/images.o   \
 
106
        gui/license.o  \
 
107
        gui/menu.o     \
 
108
        gui/options.o  \
 
109
        gui/prefs.o    \
 
110
        gui/progress.o \
 
111
        gui/textbox.o  \
 
112
        gui/window.o   \
 
113
        gui/glbsp_res.o
 
114
 
 
115
gui/%.o: gui/%.cc
 
116
        $(CXX) $(GUI_FLAGS) -c $^ -o $@
 
117
 
 
118
gui/glbsp_res.o: gui/glBSPX.rc
 
119
        $(WINDRES) -i $^ --input-format=rc -o $@ -O coff
 
120
 
 
121
$(GUI_NAME): $(LIB_NAME) $(GUI_OBJS)
 
122
        $(CXX) $(GUI_FLAGS) $(GUI_OBJS) -o $@ $(LIB_NAME) $(GUI_LIBS)
 
123
        $(STRIP) $@
 
124
 
 
125
 
 
126
# ----- DOCUMENTATION ---------------------------------------------
 
127
 
 
128
DOC_FILES=README.txt USAGE.txt TRICKS.txt CHANGES.txt
 
129
 
 
130
$(DOC_NAME): $(DOC_FILES)
 
131
        cat $(DOC_FILES) > glbsp_doc.tmp
 
132
        awk 'sub("$$", "\r")' glbsp_doc.tmp > $@
 
133
        rm -f glbsp_doc.tmp
 
134
 
 
135
 
 
136
#--- editor settings ------------
 
137
# vi:ts=8:sw=8:noexpandtab