Permission denied after compilation with help of makefile
-
30-10-2019 - |
Вопрос
I get this when I try to run my programm : bash: ./supermarket: Permission denied
The executable files appear as binary files with read & write permissions to user but no execute permission
This is the code of my makefile can u figure out what is wrong?
OBJS = supermarket.o cashier.o customer.o
SOURCE = supermarket.c cashier.c customer.c
HEADER = struct.h
OUT = supermarket cashier customer
CC = gcc
FLAGS = -lrt -g -c
#LIBS = -lm
# -g option enables debugging mode
# -c flag generates object code for separate files
# -lm math library
# -lrt semaphores
all: supermarket cashier customer
supermarket: supermarket.c
$(CC) $(FLAGS) supermarket.c -o supermarket
cashier: cashier.c
$(CC) $(FLAGS) cashier.c -o cashier
customer: customer.c
$(CC) $(FLAGS) customer.c -o customer
# clean house
clean:
rm -f $(OBJS) $(OUT)
# do a bit of accounting
count:
wc $(SOURCE) $(HEADER)
Нет правильного решения
Не связан с StackOverflow