Package: lazarus / 0.9.30.4-6

lcl-with-multple-widget-sets.diff Patch series | download
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
This patch enable building all linux supported LCL widget sets.

Index: lazarus-0.9.30.4/lcl/Makefile.fpc
===================================================================
--- lazarus-0.9.30.4/lcl/Makefile.fpc
+++ lazarus-0.9.30.4/lcl/Makefile.fpc
@@ -90,7 +90,7 @@
 [compiler]
 options=-gl $(LCL_DISABLE_CHECKS)
 unittargetdir=units/$(CPU_TARGET)-$(OS_TARGET)
-unitdir=. $(NONWIN32) forms widgetset
+unitdir=../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../components/lazutils/lib/$(CPU_TARGET)-$(OS_TARGET) . $(NONWIN32) forms widgetset
 includedir=include
 
 [install]
@@ -101,28 +101,66 @@
 files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \
       $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \
       $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \
+      $(wildcard $(COMPILER_UNITTARGETDIR)/*.lfm) \
+      $(wildcard $(COMPILER_UNITTARGETDIR)/*.res) \
+      $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) \
       $(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) \
       $(wildcard widgetset/*$(OEXT)) $(wildcard widgetset/*$(PPUEXT)) $(wildcard widgetset/*$(RSTEXT))\
       $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
 
-
 [default]
 lcldir=.
 
 [rules]
-.PHONY: cleartarget all
+.PHONY: help cleartarget lclbase all intf cleanintf cleanlaz cleanall
 
+help:
+	@$(ECHO)
+	@$(ECHO) " Important: the LCL requires components/lazutils and packager/registration"
+	@$(ECHO)
+	@$(ECHO) " Targets"
+	@$(ECHO) "   all          build lclbase and one interface"
+	@$(ECHO) "   clean        deletes files that 'all' creates"
+	@$(ECHO) "   lclbase      build lclbase"
+	@$(ECHO) "   intf         build one lcl interface, selectable via LCL_PLATFORM"
+	@$(ECHO) "   cleanintf    delete files that 'intf' creates"
+	@$(ECHO) "   cleanall     as 'clean' plus clean for all common interfaces."
+	@$(ECHO) "                Does not clean up cross compiled interfaces."
+	@$(ECHO)
+	@$(ECHO) " Examples:"
+	@$(ECHO)
+	@$(ECHO) " Compile the lcl with the default interface:"
+	@$(ECHO) "   make clean all"
+	@$(ECHO)
+	@$(ECHO) " Compile the interface for the qt widgetset:"
+	@$(ECHO) "   make cleanintf intf LCL_PLATFORM=qt"
+	@$(ECHO)
+	@$(ECHO) "Clean up:"
+	@$(ECHO) " There is no command to clean up all interfaces."
+	@$(ECHO) " In most cases it is enough to delete the 'units' directory."
+	@$(ECHO)
+
 cleartarget:
 	-$(DEL) $(COMPILER_UNITTARGETDIR)/alllclunits$(PPUEXT)
 
-all: cleartarget $(COMPILER_UNITTARGETDIR) alllclunits$(PPUEXT) $(TARGET_DIRS)
+lclbase: cleartarget $(COMPILER_UNITTARGETDIR) alllclunits$(PPUEXT)
 
-cleanlaz: clean
+intf: $(TARGET_DIRS)
+
+cleanintf:
+	$(MAKE) -C interfaces clean
+
+all: lclbase
+	for WS in gtk2 nogui qt ; do ${MAKE} intf LCL_PLATFORM=$${WS} ; done
+
+cleanlaz: cleanall
+cleanall: clean
         $(MAKE) -C interfaces clean
         $(MAKE) -C interfaces/carbon clean
         $(MAKE) -C interfaces/fpgui clean
         $(MAKE) -C interfaces/gtk clean
         $(MAKE) -C interfaces/gtk2 clean
+        $(MAKE) -C interfaces/nogui clean
         $(MAKE) -C interfaces/qt clean
         $(MAKE) -C interfaces/win32 clean
         $(MAKE) -C interfaces/wince clean