-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (35 loc) · 978 Bytes
/
Makefile
File metadata and controls
44 lines (35 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
CC = gcc
CFLAGS = -Wall -Wextra -O2 -pthread
LDFLAGS = -pthread
TARGET = blackscan
SRC = blackscan.c
HDR = blackscan.h
VERSION = 1.1
.PHONY: all clean help install uninstall
all: $(TARGET)
$(TARGET): $(SRC) $(HDR)
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)
@echo "Blackscan v$(VERSION) compilado exitosamente"
clean:
rm -f $(TARGET) *.o
install: $(TARGET)
cp $(TARGET) /usr/local/bin/
chmod +s /usr/local/bin/$(TARGET)
@echo "Instalado en /usr/local/bin/$(TARGET)"
uninstall:
rm -f /usr/local/bin/$(TARGET)
@echo "Desinstalado"
help:
@echo "Blackscan v$(VERSION) - Makefile"
@echo ""
@echo "Targets:"
@echo " all - Compilar (default)"
@echo " clean - Limpiar archivos"
@echo " install - Instalar (requiere root)"
@echo " uninstall - Desinstalar"
@echo " help - Mostrar ayuda"
@echo ""
@echo "Uso:"
@echo " make - Compilar"
@echo " make clean - Limpiar"
@echo " sudo make install - Instalar"