add lab03
This commit is contained in:
3 files changed
+147
No files matched your search
@@ -0,0 +1,29 @@
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -std=c11
|
||||
|
||||
#Input file
|
||||
INPUT = input.txt
|
||||
# Source file
|
||||
SRCS = lab3.c
|
||||
# Output
|
||||
TARGET = lab3.out
|
||||
|
||||
# Default target
|
||||
all: $(TARGET)
|
||||
|
||||
# Rule to build the executable
|
||||
$(TARGET): $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) -o $(TARGET)
|
||||
|
||||
|
||||
convert: $(INPUT)
|
||||
dos2unix $(INPUT)
|
||||
|
||||
# Rule to run the program
|
||||
run: $(TARGET)
|
||||
./$(TARGET) $(INPUT)
|
||||
|
||||
# Rule to clean generated files
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
Reference in new issue
Block a user