Task 001: Project scaffolding

Created directory structure, Makefile, and itr4m.h top-level header.
Build system auto-discovers src/**/*.c via find, uses pkg-config for
library dependencies. Handles missing deps gracefully.

Files created:
- Makefile
- include/itr4m.h
- .gitkeep files in all subdirectories

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
tr4m0ryp 2026-04-05 01:52:23 +02:00
parent adb0ec097b
commit 7d3fe3935d
15 changed files with 44 additions and 0 deletions

29
Makefile Normal file
View file

@ -0,0 +1,29 @@
CC = cc
CFLAGS = -Wall -Wextra -std=c99 -D_GNU_SOURCE -O2
LDFLAGS =
# Library discovery via pkg-config (warn but do not fail if missing)
PKG_LIBS = libimobiledevice-1.0 libirecovery-1.0 libusb-1.0 \
libplist-2.0 openssl
CFLAGS += $(shell pkg-config --cflags $(PKG_LIBS) 2>/dev/null)
LDFLAGS += $(shell pkg-config --libs $(PKG_LIBS) 2>/dev/null)
# Auto-discover all C sources under src/
SRCS = $(shell find src -name '*.c')
OBJS = $(SRCS:.c=.o)
TARGET = itr4m
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -Iinclude -c -o $@ $<
clean:
find src -name '*.o' -delete
rm -f $(TARGET)
.PHONY: all clean