You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
693 B

# ETCP Monitor Makefile for MinGW
# Usage: make [CC=gcc] [CFLAGS=...] [LDFLAGS=...]
# Compiler
CC ?= gcc
# Target
TARGET = etcpmon.exe
# Source files
SRCS = etcpmon_main.c \
etcpmon_gui.c \
etcpmon_client.c \
etcpmon_graph.c
# Object files
OBJS = $(SRCS:.c=.o)
# Windows-specific libraries
LIBS = -lws2_32 -lgdi32 -lcomdlg32 -lkernel32 -luser32 -lcomctl32
# Compiler flags
CFLAGS += -Wall -Wextra
CFLAGS += -O2
CFLAGS += -D_WIN32_WINNT=0x0601
CFLAGS += -DUNICODE -D_UNICODE
CFLAGS += -I.
# Build rule
.PHONY: all clean
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJS) $(TARGET) *.o