This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch main
in repository eradio.

View the commit online.

commit 68084f0067a44ffc52dee19f45bc0c783305f890
Author: politebot <[email protected]>
AuthorDate: Thu Oct 9 05:36:13 2025 -0500

    Init
---
 Makefile   | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.md  |  46 +++++++++++++++++++++++++++
 src/main.c |  48 ++++++++++++++++++++++++++++
 3 files changed, 198 insertions(+)

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..34d1e96
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,104 @@
+# EFL Boilerplate Makefile
+
+# Program name (change for your project)
+PROGRAM = efl_hello
+
+# Source files (add under src/)
+SOURCES = src/main.c
+
+# Object files (auto-mapped from sources)
+OBJECTS = $(SOURCES:.c=.o)
+
+# Compiler
+CC = gcc
+
+# Elementary compile/link flags via pkg-config (minimal deps)
+CFLAGS = `pkg-config --cflags elementary`
+LDFLAGS = `pkg-config --libs elementary`
+
+# Cross-platform and language standard
+CFLAGS += -std=c99
+CFLAGS += -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L
+
+# Warning levels (mirrors main project style)
+WARN_BASIC = -Wall
+WARN_MEDIUM = $(WARN_BASIC) -Wextra -Wformat=2 -Wstrict-prototypes
+WARN_STRICT = $(WARN_MEDIUM) -Wpedantic -Wcast-align -Wcast-qual -Wconversion -Wsign-conversion
+WARN_PEDANTIC = $(WARN_STRICT) -Wshadow -Wredundant-decls -Wunreachable-code -Wwrite-strings -Wpointer-arith
+
+# Default warning level
+CFLAGS += $(WARN_BASIC)
+
+# Default target
+all: $(PROGRAM)
+
+# Link the program
+$(PROGRAM): $(OBJECTS)
+	$(CC) $(OBJECTS) -o $(PROGRAM) $(LDFLAGS)
+
+# Compile source files (handles src/ paths)
+%.o: %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+
+# Clean build artifacts
+clean:
+	rm -f $(OBJECTS) $(PROGRAM)
+
+# Installation directories
+PREFIX ?= /usr/local
+DESTDIR ?=
+BINDIR  := $(PREFIX)/bin
+
+# Install binary
+install: $(PROGRAM)
+	install -d $(DESTDIR)$(BINDIR)
+	install -m 0755 $(PROGRAM) $(DESTDIR)$(BINDIR)/$(PROGRAM)
+
+# Uninstall binary
+uninstall:
+	rm -f $(DESTDIR)$(BINDIR)/$(PROGRAM)
+
+# Run the program
+run: $(PROGRAM)
+	./$(PROGRAM)
+
+# Warning level targets
+warn-basic: clean
+	@echo "Building with basic warnings (-Wall)..."
+	$(MAKE) CFLAGS="$(shell echo '$(CFLAGS)' | sed 's/$(WARN_BASIC)/$(WARN_BASIC)/')"
+
+warn-medium: clean
+	@echo "Building with medium warnings (-Wall -Wextra -Wformat=2 -Wstrict-prototypes)..."
+	$(MAKE) CFLAGS="$(shell echo '$(CFLAGS)' | sed 's/$(WARN_BASIC)/$(WARN_MEDIUM)/')"
+
+warn-strict: clean
+	@echo "Building with strict warnings (includes -Wpedantic -Wcast-align -Wcast-qual -Wconversion -Wsign-conversion)..."
+	$(MAKE) CFLAGS="$(shell echo '$(CFLAGS)' | sed 's/$(WARN_BASIC)/$(WARN_STRICT)/')"
+
+warn-pedantic: clean
+	@echo "Building with pedantic warnings (includes -Wshadow -Wredundant-decls -Wunreachable-code -Wwrite-strings -Wpointer-arith)..."
+	$(MAKE) CFLAGS="$(shell echo '$(CFLAGS)' | sed 's/$(WARN_BASIC)/$(WARN_PEDANTIC)/')"
+
+# Check dependencies
+check-deps:
+	@echo "Checking EFL dependencies..."
+	@pkg-config --exists elementary && echo "✓ Elementary (EFL) found" || echo "✗ Elementary (EFL) not found"
+	@pkg-config --modversion elementary 2>/dev/null && echo "EFL Version: `pkg-config --modversion elementary`" || echo "Could not determine EFL version"
+
+# Help target
+help:
+	@echo "Available targets:"
+	@echo "  all            - Build the program (default)"
+	@echo "  clean          - Remove build artifacts"
+	@echo "  run            - Build and run the program"
+	@echo "  check-deps     - Check if EFL dependencies are installed"
+	@echo "  install        - Install binary (PREFIX=$(PREFIX))"
+	@echo "  uninstall      - Remove installed binary"
+	@echo "Warning level targets:"
+	@echo "  warn-basic     - Build with basic warnings (-Wall)"
+	@echo "  warn-medium    - Build with medium warnings"
+	@echo "  warn-strict    - Build with strict warnings"
+	@echo "  warn-pedantic  - Build with pedantic warnings"
+
+# Declare phony targets
+.PHONY: all clean install uninstall run check-deps help warn-basic warn-medium warn-strict warn-pedantic
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..944f7c3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,46 @@
+# EFL Boilerplate Template
+
+A minimal, well-structured starter template for building desktop applications with Enlightenment Foundation Libraries (EFL). It provides a clean "Hello, World!" example, a consistent Makefile, and a conventional project layout that you can copy and adapt for new projects.
+
+## Features
+
+- Simple EFL (Elementary) window with centered "Hello, World!" label
+- Consistent Makefile with build, run, install, and warning-level targets
+- Conventional layout (`src/`) for easy expansion
+- Minimal dependencies (only `elementary` via `pkg-config`)
+
+## Prerequisites
+
+- `EFL / Elementary`
+- `gcc` with C99 support
+- `pkg-config`
+
+## Project Structure
+
+- `src/main.c` — Entry point with a minimal EFL window
+- `Makefile` — Build rules mirroring the main app’s style
+- `README.md` — This guide
+
+## Build & Run
+
+```bash
+make            # build the template
+make run        # build and run ./efl_hello
+make clean      # remove build artifacts
+make check-deps # verify Elementary is available
+```
+
+## Customizing for New Projects
+
+- Change the program name by editing `PROGRAM` in `Makefile` (default: `efl_hello`).
+- Add new source files under `src/` and update `SOURCES` accordingly, e.g. `SOURCES = src/main.c src/app.c`.
+- Use the provided pattern rule to compile files in `src/` automatically.
+
+## Code Overview
+
+The template initializes Elementary, creates a standard window, adds a background, and centers a label.
+It demonstrates core EFL concepts: window creation, object sizing, alignment, and the main event loop.
+
+## License
+
+You may reuse and modify this template freely for your projects. Consider preserving attribution to EFL.
\ No newline at end of file
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..237de05
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,48 @@
+// Minimal EFL (Elementary) "Hello, World!" application
+//
+// This file serves as a clean, well-commented starting point for
+// EFL-based desktop apps. It demonstrates:
+// - Elementary initialization and shutdown
+// - Creating a standard window
+// - Adding background and a centered label
+// - Entering the main event loop
+//
+// Build & run:
+//   make
+//   make run
+
+#include <Elementary.h>
+
+// Entry point using Elementary’s macro wrapper. This ensures proper
+// initialization and clean shutdown, and keeps main() concise.
+EAPI_MAIN int
+elm_main(int argc, char **argv)
+{
+    // Create a standard window with title and autodel behavior
+    Evas_Object *win = elm_win_util_standard_add("hello", "EFL Hello World");
+    elm_win_autodel_set(win, EINA_TRUE);
+
+    // Optional: a background to occupy the full window
+    Evas_Object *bg = elm_bg_add(win);
+    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_win_resize_object_add(win, bg);
+    evas_object_show(bg);
+
+    // Create and configure a label centered in the window
+    Evas_Object *label = elm_label_add(win);
+    elm_object_text_set(label, "Hello, World!");
+    evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(label, 0.5, 0.5);
+    elm_win_resize_object_add(win, label);
+    evas_object_show(label);
+
+    // Initial window size and show
+    evas_object_resize(win, 400, 240);
+    evas_object_show(win);
+
+    // Enter the main loop
+    elm_run();
+    return 0;
+}
+
+ELM_MAIN()
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to