emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pq 8e13d07737 16/63: Update Makefile


From: ELPA Syncer
Subject: [elpa] externals/pq 8e13d07737 16/63: Update Makefile
Date: Mon, 14 Feb 2022 23:24:20 -0500 (EST)

branch: externals/pq
commit 8e13d07737308d8ab134e50c869153f1743f286a
Author: Mario Rodas <marsam@users.noreply.github.com>
Commit: Mario Rodas <marsam@users.noreply.github.com>

    Update Makefile
---
 Makefile | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 1b412527b0..e61c75dc8e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,20 @@
+CC = gcc
+CFLAGS  = -I$(HOME)/ext/emacs/src/ -I /usr/include/postgresql/ -std=gnu99 
-ggdb3 -Wall -fPIC
+LDFLAGS = -lpq
 
-CFLAGS = -I$(HOME)/ext/emacs/src/  -I /usr/include/postgresql/
-LDFLAGS =  -lpq
-pq.so : pq.c
-       gcc -g -O3 -shared $(CFLAGS) -Wall -Werror $(LDFLAGS)  $< -o $@
+ifeq ($(OS),Windows_NT)
+TARGET = pq.dll
+else
+TARGET = pq.so
+endif
+
+all: $(TARGET)
+
+%.so: %.o
+       $(LD) -shared $(LDFLAGS) -o $@ $<
+
+%.o: %.c
+       $(CC) $(CFLAGS) -c $<
 
 clean:
-       rm -f pq.so
+       $(RM) $(TARGET)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]