documentor: Added an embedded icon for Windows
[sdk] / documentor / Makefile
index 85ea4ac..927df5f 100644 (file)
@@ -85,7 +85,8 @@ LIBS += \
 endif
 
 PRJ_CFLAGS += \
-        $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w
+        $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \
+                        -DECERE_DOCUMENTOR
 
 ECFLAGS += -module $(MODULE)
 ECFLAGS += \
@@ -216,6 +217,12 @@ $(OBJ)Documentor.o: $(OBJ)Documentor.c
 $(OBJ)SettingsDialog.o: $(OBJ)SettingsDialog.c
        $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c $(OBJ)SettingsDialog.c -o $(OBJ)SettingsDialog.o
 
+ifdef WINDOWS_TARGET
+
+$(OBJ)resources$(O): resources.rc
+       $(WINDRES) $(WINDRES_FLAGS) $< "$(call escspace,$(call quote_path,$@))"
+endif
+
 $(OBJ)$(MODULE).main$(O): $(OBJ)$(MODULE).main.c
        $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c $(OBJ)$(MODULE).main.c -o $(OBJ)$(MODULE).main$(O)
 
@@ -235,6 +242,9 @@ endif
 
 clean: cleantarget
        $(call rm,$(_OBJECTS))
+ifdef WINDOWS_TARGET
+       $(call rm,$(_RCOBJECTS))
+endif
        $(call rm,$(ECOBJECTS))
        $(call rm,$(COBJECTS))
        $(call rm,$(BOWLS))