I) Windows using plain makefiles
----------------------------------------
-a) Using the GNU MingW32 or GNU Cygwin32 compilers
+a) Using the GNU MinGW32 or GNU CygWin32 compilers
You'll need the compiler itself which is available from
http://www.cygwin.com
-When using MingW32 you'll need a few of the tools that
-are either shipped separately or only as part of the
-Cygwin32 toolchain. First and foremost, you'll need
+When using MingW32 you'll need GNU make which is part of
+part of the CygWin32 toolchain and is also available as
+a stand alone port without the infamous Cygwin.dll from
-make.exe
-byacc.exe
-
-make.exe is also available from
http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32
-> Set your path so that it includes the directory
$(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h
$(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
- $(CCLEX) -c $(CPPFLAGS) -o $@ $(COMMDIR)/y_tab.c
+ $(CCLEX) -c $(CPPFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS -o $@ $(COMMDIR)/y_tab.c
+
+$(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
+ copy ..\common\dosyacc.c ..\common\y_tab.c
+
+$(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
+ copy ..\common\doslex.c ..\common\lex_yy.c
# Replace lex with flex if you run into compilation
# problems with lex_yy.c. See also note about LEX_SCANNER
# above.
-$(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
- $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
-
+# $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
+# $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
+#
# Try one of these if the above line doesn't work.
# Alternative syntax (1)
# $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c
# Alternative syntax (2)
# $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
-
+#
# sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \
# sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
# sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c
# rm -f lex.yy.c
-
+#
# Replace yacc with bison if you run into compilation
# problems with y_tab.c.
-
-$(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
- $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
-
+#
+# $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
+# $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
+#
# If you use e.g. gcc on Unix, uncomment these lines
# and comment out the above.
-
+#
# $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
# $(YACC) $(COMMDIR)/parser.y
# mv y.tab.c $(COMMDIR)/y_tab.c
cd $(WXDIR)/src/msw
clean:
- erase *.o
- erase ../common/y_tab.c
- erase ../common/lex_yy.c
- erase $(WXDIR)/lib/libwx$(GUISUFFIX).a
- erase core
+ -erase *.o
+ -erase core
+ -erase ..\common\y_tab.c
+ -erase ..\common\lex_yy.c
+ -erase ..\common\*.o
+ -erase ..\generic\*.o
+ -erase ..\..\lib\libwx$(GUISUFFIX).a
cleanall: clean
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
-WXDIR = ..\..
+WXDIR = ../..
TARGET=minimal
OBJECTS = $(TARGET).o
RCINCSWITCH=--include-dir
RCDEFSWITCH=--define
-RESFLAGS=$(RCINCSWITCH) $(WXDIR)\include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__
+RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__
########################## Compiler flags #############################
-lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 # -loldnames
# Shouldn't need to change these...
-WXSRC=$(WXDIR)\src\msw
-WXINC=$(WXDIR)\include
-WXBASESRC=$(WXDIR)\src\common
-WXLIB=$(WXDIR)\lib\$(LIBPREFIX)wx.$(LIBSUFF)
-INC = -I$(WXINC) -I$(WXDIR)\src\png -I$(WXDIR)\src\jpeg -I$(WXDIR)\include\wx\msw\gnuwin32 -I$(WXDIR)\src\zlib $(EXTRAINC) $(COMPPATHS)
-RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include"
+WXSRC=$(WXDIR)/src/msw
+WXINC=$(WXDIR)/include
+WXBASESRC=$(WXDIR)/src/common
+WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
+INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS)
+RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)/include"
#LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS)
LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS)
$(RESCOMP) $(RCINPUTSWITCH) $(TARGET).rc $(RCOUTPUTSWITCH) $(TARGET)_resources.o $(RESFLAGS)
clean:
- rm -f $(OBJECTS) $(TARGET)_resources.o $(TARGET).exe core *.rsc *.res
+ erase *.o
+ erase $(TARGET)_resources.o
+ erase $(TARGET).exe
+ erase core
+ erase *.rsc
+ erase *.res
-# This file was automatically generated by tmake at 15:25, 1999/07/20
+# This file was automatically generated by tmake at 17:20, 1999/07/21
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
#
$(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h
$(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
- $(CCLEX) -c $(CPPFLAGS) -o $@ $(COMMDIR)/y_tab.c
+ $(CCLEX) -c $(CPPFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS -o $@ $(COMMDIR)/y_tab.c
+
+$(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
+ copy ..\common\dosyacc.c ..\common\y_tab.c
+
+$(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
+ copy ..\common\doslex.c ..\common\lex_yy.c
# Replace lex with flex if you run into compilation
# problems with lex_yy.c. See also note about LEX_SCANNER
# above.
-$(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
- $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
-
+# $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
+# $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
+#
# Try one of these if the above line doesn't work.
# Alternative syntax (1)
# $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c
# Alternative syntax (2)
# $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
-
+#
# sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \
# sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
# sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c
# rm -f lex.yy.c
-
+#
# Replace yacc with bison if you run into compilation
# problems with y_tab.c.
-
-$(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
- $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
-
+#
+# $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
+# $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
+#
# If you use e.g. gcc on Unix, uncomment these lines
# and comment out the above.
-
+#
# $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
# $(YACC) $(COMMDIR)/parser.y
# mv y.tab.c $(COMMDIR)/y_tab.c
cd $(WXDIR)/src/msw
clean:
- erase *.o
- erase ../common/y_tab.c
- erase ../common/lex_yy.c
- erase $(WXDIR)/lib/libwx$(GUISUFFIX).a
- erase core
+ -erase *.o
+ -erase core
+ -erase ..\common\y_tab.c
+ -erase ..\common\lex_yy.c
+ -erase ..\common\*.o
+ -erase ..\generic\*.o
+ -erase ..\..\lib\libwx$(GUISUFFIX).a
cleanall: clean