From 229a5080229b83eddc068ccb17f91ce8c0105009 Mon Sep 17 00:00:00 2001 From: evgeny Date: Sun, 9 Aug 2026 14:20:46 +0300 Subject: [PATCH] etcpmon: add Makefile to git (was ignored by *.gitignore Makefile pattern) --- .gitignore | 1 + tools/etcpmon/Makefile | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tools/etcpmon/Makefile diff --git a/.gitignore b/.gitignore index 91b8d274..faca4151 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ index.html # Autotools Makefile +!tools/etcpmon/Makefile Makefile.in /aclocal.m4 /autom4te.cache/ diff --git a/tools/etcpmon/Makefile b/tools/etcpmon/Makefile new file mode 100644 index 00000000..8383d035 --- /dev/null +++ b/tools/etcpmon/Makefile @@ -0,0 +1,35 @@ +# ETCP Monitor Makefile +# Usage: make [target] +# +# Targets: +# all - Build the application (default) +# clean - Remove object files and executable +# rebuild - Clean and rebuild + +CC = gcc +CFLAGS = -Wall -O2 -DWIN32_LEAN_AND_MEAN +CFLAGS += -I. -I../../src +LDFLAGS = -mwindows +LIBS = -lws2_32 -lcomctl32 -luser32 -lgdi32 + +TARGET = etcpmon.exe +SRCS = etcpmon_main.c etcpmon_gui.c etcpmon_client.c etcpmon_graph.c +OBJS = $(SRCS:.c=.o) + +.PHONY: all clean rebuild + +all: $(TARGET) + +$(TARGET): $(OBJS) + @echo Linking $@ + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + +%.o: %.c + @echo Compiling $< + $(CC) $(CFLAGS) -c -o $@ $< + +clean: + @echo Cleaning... + rm -f $(OBJS) $(TARGET) + +rebuild: clean $(TARGET)