
Note that this example Makefile is from an older software project, which specifies everything within each makefile rather than using any recursive or inclusion-based makefile hierarchy, and is presented here for the purposes of the C intro project only. It is modified from the original for the purposes of the C intro project.
CC= gcc CFLAGS= -Wall -O2 LFLAGS+=
SRCS= cas.c \
client.c \
hashtable_itr.c
OBJS= ${SRCS:.c=.o}
all: libmarquis.a libmarquis.so
clean:
rm -f libmarquis.a libmarquis.so *.o
libmarquis.a: ${OBJS}
ar -r $@ ${OBJS}
libmarquis.so:${OBJS}
${CC} -shared ${CFLAGS} -fPIC -Wl,-soname,libmarquis.so -o $@ \
${OBJS}
.c.o:
${CC} ${CFLAGS} -c $<
—————
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals