ide/FindInFiles: Fixed ridiculous stack usage causing bus errors on OS X
[sdk] / ide / Makefile
index 44162ab..7377d01 100644 (file)
@@ -2,7 +2,7 @@
 
 # CORE VARIABLES
 
-MODULE := ide
+MODULE := ecere-ide
 VERSION := 
 CONFIG := release
 ifndef COMPILER
@@ -42,13 +42,14 @@ OBJ = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/
 
 RES = res/
 
-TARGET = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ide$(E)
+TARGET = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/ecere-ide$(E)
 
 _ECSOURCES = \
        ../extras/FileSystemIterator.ec \
        ../extras/gui/layout.ec \
        ../extras/gui/controls/StringsBox.ec \
        ../extras/types/DynamicString.ec \
+       ../extras/include/dpl.ec \
        src/dialogs/CompilersDetectionDialog.ec \
        src/dialogs/FindInFilesDialog.ec \
        src/dialogs/GlobalSettingsDialog.ec \
@@ -161,18 +162,18 @@ RESOURCES1 = \
        $(RES)codeMarks/topFrameHalfError.png \
        $(RES)others/mousePointer.png \
        $(RES)status/software-update-available.png \
-       locale/ide-es.mo \
-       locale/ide-pt_BR.mo \
-       locale/ide-ru.mo \
-       locale/ide-vi.mo \
-       locale/ide-zh_CN.mo \
+       locale/es.mo \
+       locale/pt_BR.mo \
+       locale/ru.mo \
+       locale/vi.mo \
+       locale/zh_CN.mo \
        ../LICENSE \
        ../extras/res/licenses/png.LICENSE \
        ../extras/res/licenses/tango.COPYING \
-       ../extras/res/licenses/zlib.README
-RESOURCES2 = \
+       ../extras/res/licenses/zlib.README \
        ../extras/res/licenses/sqlite.LICENSE \
-       ../extras/res/licenses/jpg.LICENSE \
+       ../extras/res/licenses/jpg.LICENSE
+RESOURCES2 = \
        ../extras/res/licenses/ungif.LICENSE \
        ../extras/res/licenses/freetype.LICENSE \
        ../extras/res/licenses/harfbuzz.LICENSE \
@@ -190,6 +191,7 @@ RESOURCES2 = \
        ../extras/res/types/countryCode/in.png \
        ../extras/res/types/countryCode/nl.png \
        ../extras/res/types/countryCode/il.png \
+       ../extras/res/types/countryCode/br.png \
        res/ecere.jpg \
        res/ecereBack.jpg \
        res/icon.png \
@@ -209,14 +211,14 @@ PRJ_CFLAGS += \
                         -I/usr/X11R6/include,) \
         $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \
                         $(FVISIBILITY) \
-                        -DREPOSITORY_VERSION="\"$(REPOSITORY_VER)\""
-
-
+                        -DREPOSITORY_VERSION="\"$(REPOSITORY_VER)\"" \
+                        -I../extras/include \
+                        -DECERE_IDE
 
+ECFLAGS += -module $(MODULE)
 ECFLAGS += \
         -nolinenumbers
 
-
 # PLATFORM-SPECIFIC OPTIONS
 
 ifdef LINUX_TARGET
@@ -225,7 +227,8 @@ ifndef STATIC_LIBRARY_TARGET
 OFLAGS += \
         -L/usr/X11R6/lib
 LIBS += \
-       $(call _L,X11)
+       $(call _L,X11) \
+       $(call _L,m)
 endif
 
 else
@@ -235,14 +238,13 @@ ifndef STATIC_LIBRARY_TARGET
 OFLAGS += \
         -L/usr/X11R6/lib
 LIBS += \
-       $(call _L,X11)
+       $(call _L,X11) \
+       $(call _L,m)
 endif
 
 endif
 endif
 
-
-
 CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
@@ -256,7 +258,7 @@ endif
 all: objdir $(TARGET)
 
 objdir:
-       $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
+       $(if $(wildcard $(OBJ)),,$(call mkdir,$(OBJ)))
 
 $(OBJ)$(MODULE).main.ec: $(SYMBOLS) $(COBJECTS)
        $(ECS) $(ARCH_FLAGS) $(ECSLIBOPT) $(SYMBOLS) $(IMPORTS) -symbols obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX) -o $(OBJ)$(MODULE).main.ec
@@ -280,14 +282,15 @@ endif
        $(EAR) aw$(EARFLAGS) $(TARGET) $(RES)codeMarks/breakpoint.png $(RES)codeMarks/breakpointDisabled.png $(RES)codeMarks/breakpointHalf.png $(RES)codeMarks/breakpointHalfDisabled.png $(RES)codeMarks/cursor.png $(RES)codeMarks/cursorError.png $(RES)codeMarks/topFrame.png $(RES)codeMarks/topFrameError.png $(RES)codeMarks/topFrameHalf.png $(RES)codeMarks/topFrameHalfError.png "codeMarks"
        $(EAR) aw$(EARFLAGS) $(TARGET) $(RES)others/mousePointer.png "others"
        $(EAR) aw$(EARFLAGS) $(TARGET) $(RES)status/software-update-available.png "status"
-       $(EAR) aw$(EARFLAGS) $(TARGET) locale/ide-es.mo locale/ide-pt_BR.mo locale/ide-ru.mo locale/ide-vi.mo locale/ide-zh_CN.mo "locale"
+       $(EAR) aw$(EARFLAGS) $(TARGET) locale/es.mo locale/pt_BR.mo locale/ru.mo locale/vi.mo locale/zh_CN.mo "locale"
        $(EAR) aw$(EARFLAGS) $(TARGET) ../LICENSE ../extras/res/licenses/png.LICENSE ../extras/res/licenses/tango.COPYING ../extras/res/licenses/zlib.README ../extras/res/licenses/sqlite.LICENSE ../extras/res/licenses/jpg.LICENSE ../extras/res/licenses/ungif.LICENSE ../extras/res/licenses/freetype.LICENSE ../extras/res/licenses/harfbuzz.LICENSE ../extras/res/licenses/upx.LICENSE "licenses"
        $(EAR) aw$(EARFLAGS) $(TARGET) ../extras/res/licenses/MinGW-w64.LICENSE ../extras/res/licenses/tdm-gcc.LICENSE ../extras/res/licenses/ffi.LICENSE "licenses"
        $(EAR) aw$(EARFLAGS) $(TARGET) ../extras/res/types/countryCode/es.png ../extras/res/types/countryCode/gb.png ../extras/res/types/countryCode/hu.png ../extras/res/types/countryCode/cn.png ../extras/res/types/countryCode/pt.png ../extras/res/types/countryCode/vn.png ../extras/res/types/countryCode/ru.png ../extras/res/types/countryCode/in.png ../extras/res/types/countryCode/nl.png ../extras/res/types/countryCode/il.png "countryCode"
+       $(EAR) aw$(EARFLAGS) $(TARGET) ../extras/res/types/countryCode/br.png "countryCode"
 else
        $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
 endif
-       $(call cpq,$(TARGET),../obj/$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/bin/)
+       $(call cp,$(TARGET),../obj/$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/bin/)
 
 # SYMBOL RULES
 
@@ -303,6 +306,9 @@ $(OBJ)StringsBox.sym: ../extras/gui/controls/StringsBox.ec
 $(OBJ)DynamicString.sym: ../extras/types/DynamicString.ec
        $(ECP) $(CFLAGS) $(CECFLAGS) $(ECFLAGS) $(PRJ_CFLAGS) -c ../extras/types/DynamicString.ec -o $(OBJ)DynamicString.sym
 
+$(OBJ)dpl.sym: ../extras/include/dpl.ec
+       $(ECP) $(CFLAGS) $(CECFLAGS) $(ECFLAGS) $(PRJ_CFLAGS) -c ../extras/include/dpl.ec -o $(OBJ)dpl.sym
+
 $(OBJ)CompilersDetectionDialog.sym: src/dialogs/CompilersDetectionDialog.ec
        $(ECP) $(CFLAGS) $(CECFLAGS) $(ECFLAGS) $(PRJ_CFLAGS) -c src/dialogs/CompilersDetectionDialog.ec -o $(OBJ)CompilersDetectionDialog.sym
 
@@ -438,6 +444,9 @@ $(OBJ)StringsBox.c: ../extras/gui/controls/StringsBox.ec $(OBJ)StringsBox.sym |
 $(OBJ)DynamicString.c: ../extras/types/DynamicString.ec $(OBJ)DynamicString.sym | $(SYMBOLS)
        $(ECC) $(CFLAGS) $(CECFLAGS) $(ECFLAGS) $(PRJ_CFLAGS) -c ../extras/types/DynamicString.ec -o $(OBJ)DynamicString.c -symbols $(OBJ)
 
+$(OBJ)dpl.c: ../extras/include/dpl.ec $(OBJ)dpl.sym | $(SYMBOLS)
+       $(ECC) $(CFLAGS) $(CECFLAGS) $(ECFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c ../extras/include/dpl.ec -o $(OBJ)dpl.c -symbols $(OBJ)
+
 $(OBJ)CompilersDetectionDialog.c: src/dialogs/CompilersDetectionDialog.ec $(OBJ)CompilersDetectionDialog.sym | $(SYMBOLS)
        $(ECC) $(CFLAGS) $(CECFLAGS) $(ECFLAGS) $(PRJ_CFLAGS) -c src/dialogs/CompilersDetectionDialog.ec -o $(OBJ)CompilersDetectionDialog.c -symbols $(OBJ)
 
@@ -573,6 +582,9 @@ $(OBJ)StringsBox.o: $(OBJ)StringsBox.c
 $(OBJ)DynamicString.o: $(OBJ)DynamicString.c
        $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(OBJ)DynamicString.c -o $(OBJ)DynamicString.o
 
+$(OBJ)dpl.o: $(OBJ)dpl.c
+       $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c $(OBJ)dpl.c -o $(OBJ)dpl.o
+
 $(OBJ)CompilersDetectionDialog.o: $(OBJ)CompilersDetectionDialog.c
        $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(OBJ)CompilersDetectionDialog.c -o $(OBJ)CompilersDetectionDialog.o
 
@@ -700,22 +712,36 @@ $(OBJ)$(MODULE).main$(O): $(OBJ)$(MODULE).main.c
        $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(OBJ)$(MODULE).main.c -o $(OBJ)$(MODULE).main$(O)
 
 cleantarget: objdir
-       $(call rmq,$(TARGET))
+       $(call rm,$(OBJ)$(MODULE).main.o $(OBJ)$(MODULE).main.c $(OBJ)$(MODULE).main.ec $(OBJ)$(MODULE).main$(I) $(OBJ)$(MODULE).main$(S))
+       $(call rm,$(OBJ)symbols.lst)
+       $(call rm,$(OBJ)objects.lst)
+       $(call rm,$(TARGET))
+ifdef SHARED_LIBRARY_TARGET
+ifdef LINUX_TARGET
+ifdef LINUX_HOST
+       $(call rm,$(OBJ)$(LP)$(MODULE)$(SO)$(basename $(VER)))
+       $(call rm,$(OBJ)$(LP)$(MODULE)$(SO))
+endif
+endif
+endif
 
 clean: cleantarget
-       $(call rmq,$(_OBJECTS))
+       $(call rm,$(_OBJECTS))
 ifdef WINDOWS_TARGET
-       $(call rmq,$(RCOBJECTS))
+       $(call rm,$(RCOBJECTS))
 endif
-       $(call rmq,$(OBJ)$(MODULE).main.o $(OBJ)$(MODULE).main.c $(OBJ)$(MODULE).main.ec $(OBJ)$(MODULE).main$(I) $(OBJ)$(MODULE).main$(S))
-       $(call rmq,$(ECOBJECTS))
-       $(call rmq,$(COBJECTS))
-       $(call rmq,$(BOWLS))
-       $(call rmq,$(IMPORTS))
-       $(call rmq,$(SYMBOLS))
+       $(call rm,$(ECOBJECTS))
+       $(call rm,$(COBJECTS))
+       $(call rm,$(BOWLS))
+       $(call rm,$(IMPORTS))
+       $(call rm,$(SYMBOLS))
 
 realclean: cleantarget
-       $(call rmrq,$(OBJ))
+       $(call rmr,$(OBJ))
+
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
-distclean: cleantarget
-       $(call rmrq,obj/)
+Makefile: ;
+$(_CF_DIR)crossplatform.mk: ;
+$(_CF_DIR)default.cf: ;