makefile 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. CSC=mcs
  2. X11R6_INCLUDE=/usr/X11R6/include
  3. WINE_INCLUDE=/usr/local/include/wine
  4. WINE_LIB=/usr/local/lib/wine
  5. GLIB20_INCLUDE=`pkg-config --cflags glib-2.0` `pkg-config --cflags gmodule-2.0`
  6. GLIB20_LIB=`pkg-config --libs glib-2.0` `pkg-config --libs gmodule-2.0`
  7. # GLIB20_LIB_INCLUDE=/usr/lib/glib-2.0/include
  8. LIBMONO=/usr/local/lib/libmono.a
  9. SOURCES = \
  10. Win32.cs \
  11. Font.cs \
  12. MenuItem.cs \
  13. DrawItemEventArgs.cs \
  14. DrawItemEventHandler.cs \
  15. ../System.Windows.Forms/BorderStyle.cs \
  16. ../System.Windows.Forms/Message.cs \
  17. ../System.Windows.Forms/CreateParams.cs \
  18. ../System.Windows.Forms/MdiLayout.cs \
  19. ../System.Windows.Forms/InputLanguage.cs \
  20. ../System.Windows.Forms/InputLanguageCollection.cs \
  21. ../System.Windows.Forms/InputLanguageChangedEventArgs.cs \
  22. ../System.Windows.Forms/InputLanguageChangingEventArgs.cs \
  23. ../System.Windows.Forms/PaintEventArgs.cs \
  24. ../System.Windows.Forms/Keys.cs \
  25. ../System.Windows.Forms/BoundsSpecified.cs \
  26. ../System.Windows.Forms/RightToLeft.cs \
  27. ../System.Windows.Forms/Shortcut.cs \
  28. ../System.Windows.Forms/MeasureItemEventArgs.cs \
  29. ../System.Windows.Forms/SizeGripStyle.cs \
  30. ../System.Windows.Forms/FormStartPosition.cs \
  31. ../System.Windows.Forms/FormWindowState.cs \
  32. ../System.Windows.Forms/ImeMode.cs \
  33. ../System.Windows.Forms/InputLanguageChangedEventHandler.cs \
  34. ../System.Windows.Forms/MeasureItemEventHandler.cs \
  35. ../System.Windows.Forms/InputLanguageChangingEventHandler.cs \
  36. ../System.Windows.Forms/DrawItemState.cs \
  37. ../System.Windows.Forms/ComVisible.cs \
  38. ../System.Windows.Forms/DialogResult.cs \
  39. ../System.Windows.Forms/IButtonControl.cs \
  40. ../System.Windows.Forms/FormBorderStyle.cs \
  41. ../System.Windows.Forms/AccessibleEvents.cs \
  42. ../System.Windows.Forms/IWin32Window.cs \
  43. ../System.Windows.Forms/DragDropEffects.cs \
  44. ../System.Windows.Forms/ControlStyles.cs \
  45. ../System.Windows.Forms/ControlEventArgs.cs \
  46. ../System.Windows.Forms/DragEventArgs.cs \
  47. ../System.Windows.Forms/GiveFeedbackEventArgs.cs \
  48. ../System.Windows.Forms/HelpEventArgs.cs \
  49. ../System.Windows.Forms/InvalidateEventArgs.cs \
  50. ../System.Windows.Forms/KeyEventArgs.cs \
  51. ../System.Windows.Forms/KeyPressEventArgs.cs \
  52. ../System.Windows.Forms/MouseEventArgs.cs \
  53. ../System.Windows.Forms/LayoutEventArgs.cs \
  54. ../System.Windows.Forms/QueryContinueDragEventArgs.cs \
  55. ../System.Windows.Forms/HorizontalAlignment.cs \
  56. ../System.Windows.Forms/LeftRightAlignment.cs \
  57. ../System.Windows.Forms/AccessibleRole.cs \
  58. ../System.Windows.Forms/AnchorStyles.cs \
  59. ../System.Windows.Forms/Cursor.cs \
  60. ../System.Windows.Forms/BaseCollection.cs \
  61. ../System.Windows.Forms/DockStyle.cs \
  62. ../System.Windows.Forms/ControlEventHandler.cs \
  63. ../System.Windows.Forms/MouseButtons.cs \
  64. ../System.Windows.Forms/UICues.cs \
  65. ../System.Windows.Forms/UICuesEventArgs.cs \
  66. ../System.Windows.Forms/UICuesEventHandler.cs \
  67. ../System.Windows.Forms/DragEventHandler.cs \
  68. ../System.Windows.Forms/HelpEventHandler.cs \
  69. ../System.Windows.Forms/GiveFeedbackEventHandler.cs \
  70. ../System.Windows.Forms/InvalidateEventHandler.cs \
  71. ../System.Windows.Forms/KeyEventHandler.cs \
  72. ../System.Windows.Forms/KeyPressEventHandler.cs \
  73. ../System.Windows.Forms/LayoutEventHandler.cs \
  74. ../System.Windows.Forms/MouseEventHandler.cs \
  75. ../System.Windows.Forms/PaintEventHandler.cs \
  76. ../System.Windows.Forms/QueryAccessibilityHelpEventHandler.cs \
  77. ../System.Windows.Forms/QueryContinueDragEventHandler.cs \
  78. ../System.Windows.Forms/IDataObject.cs \
  79. ../System.Windows.Forms/DragAction.cs \
  80. ../System.Windows.Forms/QueryAccessibilityHelpEventArgs.cs \
  81. ../System.Windows.Forms/IMessageFilter.cs \
  82. ../System.Windows.Forms/ApplicationContext.cs \
  83. ../System.Windows.Forms/MessageBoxButtons.cs \
  84. ../System.Windows.Forms/MessageBoxIcon.cs \
  85. ../System.Windows.Forms/MessageBoxDefaultButton.cs \
  86. ../System.Windows.Forms/MessageBoxOptions.cs \
  87. ../System.Windows.Forms/FlatStyle.cs \
  88. ../System.Windows.Forms/ImageListStreamer.cs \
  89. ../System.Windows.Forms/ImageList.cs \
  90. ../System.Windows.Forms/ColorDepth.cs \
  91. IContainerControl.cs \
  92. Control.cs \
  93. ScrollableControl.cs \
  94. ContainerControl.cs \
  95. Label.cs \
  96. Form.cs \
  97. Application.cs \
  98. NativeWindow.cs \
  99. MessageBox.cs
  100. all: monostub.exe.so System.Windows.Forms.dll NativeWindowTest.exe \
  101. FormTest.exe Test.exe
  102. ##########################################################################
  103. # build the mono stub application
  104. monostub.exe.so: monostub.o monostub.exe.spec.o monostub.exe.dbg.o
  105. gcc -shared -Wl,-Bsymbolic -D_REENTRANT -DWINELIB -o monostub.exe.so \
  106. monostub.exe.spec.o \
  107. monostub.o monostub.exe.dbg.o -I/usr/local/include \
  108. $(GLIB20_INCUDE) -L/usr/lib \
  109. /usr/local/lib/libmono.a -lgc \
  110. -lwine -lntdll.dll $(GLIB20_LIB) -lm -lpthread
  111. clean:
  112. rm *.o monostub.exe.dbg.c monostub.exe.spec.c monostub.exe.so *.exe *.dll
  113. monostub.o: monostub.c
  114. gcc -c -I. -I$(WINE_INCLUDE) $(GLIB20_INCLUDE) -g -O2 -Wall -I$(X11R6_INCLUDE) -D_REENTRANT -DWINELIB -o monostub.o monostub.c
  115. monostub.exe.tmp.o: monostub.o
  116. ld -r monostub.o -o monostub.exe.tmp.o
  117. strip --strip-unneeded monostub.exe.tmp.o
  118. monostub.exe.spec.c: monostub.exe.tmp.o
  119. winebuild -sym monostub.exe.tmp.o -o monostub.exe.spec.c -exe monostub.exe -mgui -L$(WINE_LIB) -lcomdlg32 -lshell32 -luser32 -lgdi32 -lkernel32
  120. monostub.exe.spec.o: monostub.exe.spec.c
  121. gcc -c -I. -I. -I$(WINE_INCLUDE) -g -O2 -I$(X11R6_INCLUDE) -D_REENTRANT -DWINELIB -o monostub.exe.spec.o monostub.exe.spec.c
  122. monostub.exe.dbg.c: monostub.exe.spec.o
  123. winebuild -o monostub.exe.dbg.c -debug -C. monostub.c
  124. monostub.exe.dbg.o: monostub.exe.dbg.c
  125. gcc -c -I. -I. -I$(WINE_INCLUDE) -g -O2 -I$(X11R6_INCLUDE) -D_REENTRANT -DWINELIB -o monostub.exe.dbg.o monostub.exe.dbg.c
  126. ##########################################################################
  127. # build System.Windows.Forms.dll and test/sample applications
  128. Test.exe: Test.cs
  129. $(CSC) Test.cs
  130. NativeWindowTest.exe: NativeWindowTest.cs System.Windows.Forms.dll
  131. $(CSC) -r System.Windows.Forms.dll NativeWindowTest.cs
  132. FormTest.exe: FormTest.cs System.Windows.Forms.dll
  133. $(CSC) -r System.Windows.Forms.dll FormTest.cs
  134. System.Windows.Forms.dll: $(SOURCES)
  135. $(CSC) --target library -o System.Windows.Forms.dll $(SOURCES) -r System.Drawing