5 # put the next line in comment if you don't have the gd-library
8 # put the next line in comment if not compiling for MS Windows
11 # this uses the new filechooser widget
12 NEWFILECHOOSER
= -DNEWFILECHOOSER
13 FCDIR
= FileChooser-1.4
.1
15 # set your compile-options here
17 #COMPILEFLAGS = -O0 -g -Wall #-pg
19 ###########################################
20 # no user servicable parts after this line
21 ###########################################
23 # are there any extra include paths
26 EXTRAINCLUDES
= -I.
/gd
-I.
/libpng
-I.
/zlib
28 EXTRAINCLUDES
= -I
/usr
/local
/include
33 EXTRAINCLUDES
+= -I.
/$(FCDIR
) -DFLTK_1_0_COMPAT
36 # what libraries to link with
39 gd_libs
= -L
/usr
/local
/lib
-lgd
-lpng
-lz
41 gd_libs
= -L.
/gd
-lgd
-L.
/libpng
-lpng
-L.
/zlib
-lz
46 libs
= -lgdi32
-luser32
-lfltk
-lwsock32
-mwindows
$(gd_libs
)
48 libs
= -L
/usr
/X11R6
/lib
-lX11
-lXext
-lm
-lfltk
$(gd_libs
)
49 # libs += -L/usr/local/lib /usr/local/lib/ccmalloc.o $(gd_libs) \
53 DEFINES
= -DWINGIPF
$(MSWIN
) $(GDLIB
) $(NEWFILECHOOSER
) $(EXTRAINCLUDES
)
55 CFLAGS
= $(COMPILEFLAGS
) $(DEFINES
)
56 DATE
= `date +'%Y%m%d'`
64 sources_c
= configfile.c linklist.c position.c \
65 rem_gipf.c rem_row.c gettimeofday.c
66 sources_cxx
= gipf_ui.
cxx callbacks.
cxx core.
cxx fl_board.
cxx fl_pile.
cxx \
67 setup_win.
cxx thegame.
cxx win_human.
cxx drawgif.
cxx \
68 ai_player.
cxx ai_gipf.
cxx xmlite.
cxx board2.
cxx gamelog2.
cxx
71 sources_filechooser
= $(FCDIR
)/FileBrowser.
cxx $(FCDIR
)/FileChooser.
cxx \
72 $(FCDIR
)/FileChooser2.
cxx $(FCDIR
)/FileIcon.
cxx \
73 $(FCDIR
)/FileInput.
cxx
77 objects
= $(sources_c
:.c
=.o
) $(sources_cxx
:.
cxx=.o
) \
78 $(sources_filechooser
:.
cxx=.o
)
92 $(CXX
) $(CFLAGS
) -c
-o
$@
$*.
cxx
94 .PHONY
: all clean realclean fullzip winzip linuxzip doc
99 - rm $(program
) $(objects
)
102 - rm *.d gipf_ui.H gipf_ui.
cxx helptext.h gf1_doc.txt gf1_doc
*.html
105 zip gf1_src_
$(DATE
) RCS
/* * $(FCDIR
)/* \
106 -x core \
*.o \
*.zip \
*~
$(program
)
109 zip gf1_wexe gf1.exe gf1_doc.txt README.txt COPYING.txt HISTORY.txt \
110 gf1_doc
*.html TODO.txt small_logo.png
113 zip gf1_lexe gf1 gf1_doc.txt README.txt COPYING.txt HISTORY.txt \
114 gf1_doc
*.html TODO.txt small_logo.png
118 $(program
): $(objects
)
119 $(CXX
) $(CFLAGS
) -o
$@
$^
$(libs
)
121 gipf_ui.H gipf_ui.
cxx: gipf_ui.fl
122 $(FLUID
) -c gipf_ui.fl
123 mv gipf_ui.C gipf_ui.
cxx
125 helptext.h
: gf1_doc.txt
126 $(PERL
) makehelptext.pl
$< $@
128 gf1_doc.txt
: gf1_doc.sgml
131 gf1_doc.html
: gf1_doc.sgml
134 icons.o
: icons.rc win_icon.ico
140 # some things for automatic dependency generation
142 $(SHELL
) -ec
'$(CC) -MM $(CPPFLAGS) $(DEFINES) $< \
143 | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@'
146 $(SHELL
) -ec
'$(CXX) -MM $(CPPFLAGS) $(DEFINES) $< \
147 | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@'
149 include $(sources_c
:.c
=.d
)
150 include $(sources_cxx
:.
cxx=.d
)
152 # not all dependencies can be added automatically
153 # so I add some here myself
154 win_human.
cxx thegame.
cxx setup_win.
cxx core.
cxx: gipf_ui.H
155 callbacks.
cxx: helptext.h