From bf9bce08a8ea7626f3e2fe7817353a3c894f911f Mon Sep 17 00:00:00 2001 From: Nathan Singer Date: Mon, 21 Apr 2025 21:21:30 -0400 Subject: [PATCH] initial --- Makefile | 24 ++++++++++++++++++++++++ src/main.cpp | 0 2 files changed, 24 insertions(+) create mode 100644 Makefile create mode 100644 src/main.cpp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..afc642e --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +CC=g++ +CFLAGS= -c -g -Wall + +LDLIBS = -lgtk + +TARGET := untap + +BUILD_DIR := ./build +SRC_DIRS := ./src + +SRCS := $(shell find $(SRC_DIRS) -name '*.cpp') + +OBJS := $(SRCS:%=$(BUILD_DIR)/%.o) + +$(BUILD_DIR)/$(TARGET): $(OBJS) + $(CC) $(OBJS) -o $@ $(LDLIBS) + +$(BUILD_DIR)/%.c.o: %.cpp + mkdir -p $(dir $@) + $(CC) $(CFLAGS) -c $< -o $@ + +.PHONY: clean +clean: + rm -rf $(BUILD_DIR) diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..e69de29