Compile static library with Makefile

From AcrodusWiki
Revision as of 20:12, 4 February 2025 by Alex (talk | contribs) (Created page with "Makefile example for compiling static library with dependencies in C. <pre> # Library: libgenisys # File: Makefile # Author: Alexander Brown # # NO LICENSE # BINDIR = bin/ OBJDIR = obj/ INCDIR = include/ SRCDIR = src/ CC = gcc RM = /bin/rm -f SOURCE = grail.c OBJECT = grail.o all: ${CC} `pkg-config --cflags cairo pangocairo` -o ${OBJDIR}${OBJECT} -c ${SRCDIR}${SOURCE} `pkg-config --libs cairo pangocairo` clean: ${RM} ${BINDIR}* ${RM} ${OBJ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Makefile example for compiling static library with dependencies in C.

# Library: libgenisys
# File: Makefile
# Author: Alexander Brown
#
# NO LICENSE
#

BINDIR = bin/
OBJDIR = obj/
INCDIR = include/
SRCDIR = src/

CC = gcc
RM = /bin/rm -f

SOURCE = grail.c
OBJECT = grail.o

all:
        ${CC} `pkg-config --cflags cairo pangocairo` -o ${OBJDIR}${OBJECT} -c ${SRCDIR}${SOURCE}  `pkg-config --libs  cairo pangocairo`

clean:
        ${RM} ${BINDIR}*
        ${RM} ${OBJDIR}*