initial commit
This commit is contained in:
26
Makefile
Normal file
26
Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
# Variables
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -Wextra -Werror
|
||||
TARGET = code_analyzer
|
||||
SCRIPT = analyze.sh
|
||||
INSTALL_DIR = /usr/local/bin
|
||||
|
||||
# Default target
|
||||
all: $(TARGET)
|
||||
|
||||
# Compile the C program
|
||||
$(TARGET): code_analyzer.c
|
||||
$(CC) $(CFLAGS) -o $(TARGET) code_analyzer.c
|
||||
|
||||
# Install the script and binary
|
||||
install: $(TARGET) $(SCRIPT)
|
||||
sudo cp $(TARGET) $(INSTALL_DIR)/$(TARGET)
|
||||
sudo cp $(SCRIPT) $(INSTALL_DIR)/$(SCRIPT)
|
||||
sudo chmod +x $(INSTALL_DIR)/$(SCRIPT)
|
||||
|
||||
# Clean up the binary
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
|
||||
# Phony targets
|
||||
.PHONY: all install clean
|
||||
Reference in New Issue
Block a user