specify the libraries after source files

This commit is contained in:
Liao Junxuan 2022-01-24 00:16:43 +08:00
parent a78c716475
commit 11ad767bd4

View File

@ -3,12 +3,13 @@ PREFIX ?= /usr/local
NAME ?= find-cursor NAME ?= find-cursor
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wpedantic -Os CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wpedantic -Os
LDFLAGS += -L/usr/lib -lX11 -lXext -lXfixes LDFLAGS += -L/usr/lib
LIBS += -lX11 -lXext -lXfixes
.PHONY: all clean install uninstall .PHONY: all clean install uninstall
all: all:
${CC} ${CFLAGS} ${LDFLAGS} -o ${NAME} *.c ${CC} ${CFLAGS} ${LDFLAGS} -o ${NAME} *.c ${LIBS}
clean: clean:
rm -f ${NAME} rm -f ${NAME}