Answers for "makefile example"

1

make file creation

hello: hello.c
    ${CC} hello.c -o hello
Posted by: Guest on November-10-2020
-1

makefile example

# Define required macros here
SHELL = /bin/sh

OBJS =  main.o factorial.o hello.o
CFLAG = -Wall -g
CC = gcc
INCLUDE =
LIBS = -lm

hello:${OBJ}
   ${CC} ${CFLAGS} ${INCLUDES} -o $@ ${OBJS} ${LIBS}

clean:
   -rm -f *.o core *.core

.cpp.o:
   ${CC} ${CFLAGS} ${INCLUDES} -c $<
Posted by: Guest on August-03-2021

Browse Popular Code Answers by Language