mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 11:43:10 +02:00
32 lines
513 B
Makefile
32 lines
513 B
Makefile
# Compiler
|
|
CC = gcc
|
|
|
|
# Compiler flags
|
|
CFLAGS = -Wall -O3 -march=native -flto -fomit-frame-pointer
|
|
|
|
# Libraries
|
|
LIBS = -ljpeg
|
|
|
|
# Source files
|
|
SRCS = generate_jpg.c
|
|
|
|
# Output executable
|
|
TARGET = generate_images
|
|
|
|
# Default target
|
|
all: $(TARGET)
|
|
|
|
# Link and compile the program
|
|
$(TARGET): $(SRCS)
|
|
$(CC) $(CFLAGS) -o $(TARGET) $(SRCS) $(LIBS)
|
|
|
|
# Clean up build artifacts
|
|
clean:
|
|
rm -f $(TARGET)
|
|
|
|
# Install the program (optional)
|
|
install: $(TARGET)
|
|
install -m 755 $(TARGET) /usr/local/bin/
|
|
|
|
.PHONY: all clean install
|