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 $<
—————
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024