Skip to content

Commit

Permalink
create pkg-config and modify makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mazylol committed Sep 14, 2024
1 parent 5908b49 commit 033ef3c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
!Makefile
!config.json
!.github/**
!concord.pc
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PREFIX ?= /usr/local
SHAREDIR ?= /usr/share
DESTINCLUDE_DIR = $(PREFIX)/include/concord
DESTLIBDIR = $(PREFIX)/lib
PKGCONFIGDIR = $(SHAREDIR)/pkgconfig

SRC_DIR = src
INCLUDE_DIR = include
Expand Down Expand Up @@ -43,12 +45,14 @@ install:
install -d $(DESTINCLUDE_DIR)
install -m 644 $(INCLUDE_DIR)/*.h $(CORE_DIR)/*.h $(GENCODECS_DIR)/*.h \
$(DESTINCLUDE_DIR)
install -D concord.pc $(PKGCONFIGDIR)/concord.pc

uninstall:
rm -rf $(PREFIX)/include/concord
rm -rf $(PREFIX)/lib/libdiscord.a
rm -rf $(PREFIX)/lib/libdiscord.so
rm -rf $(PREFIX)/lib/libdiscord.dylib
rm -f $(PKGCONFIGDIR)/concord.pc

docs:
@ $(MAKE) -C $(GENCODECS_DIR) headers
Expand Down
11 changes: 11 additions & 0 deletions concord.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${exec_prefix}/include

Name: concord
URL: https://github.com/Cogmasters/concord
Version: 2.3.0
Description: A Discord API wrapper library made in C
Libs: -L${libdir} -ldiscord
Cflags: -I${includedir}/concord

0 comments on commit 033ef3c

Please sign in to comment.