commit e6bc07838cb8dcfefc6d317deeb87463b724c972
parent 829ca14f5de5bd195080f4f01d1f67ae0f1221c4
Author: CNLohr <lohr85@gmail.com>
Date: Thu, 26 Sep 2019 18:22:02 -0700
Merge pull request #63 from dreua/improve-makefile
Allow compiler customization
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -3,6 +3,7 @@ all : cnping searchnet
CFLAGS:=$(CFLAGS) -s -Os -I/opt/X11/include -Wall
CXXFLAGS:=$(CFLAGS)
LDFLAGS:=-s -L/opt/X11/lib/
+CC:=gcc
#CFLAGS:=$(CFLAGS) -DCNFGOGL
#LDFLAGS:=$(LDFLAGS) -lGL
@@ -18,13 +19,13 @@ cnping.exe : cnping.c rawdraw/CNFGFunctions.c rawdraw/CNFGWinDriver.c rawdraw/os
$(MINGW32)gcc -g -fno-ident -mwindows -m32 $(CFLAGS) resources.o -o $@ $^ -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32 -liphlpapi -DMINGW_BUILD $(ADMINFLAGS)
cnping : cnping.o rawdraw/CNFGFunctions.o rawdraw/CNFGXDriver.o rawdraw/os_generic.o ping.o httping.o
- gcc $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS)
cnping_mac : cnping.c rawdraw/CNFGFunctions.c rawdraw/CNFGCocoaCGDriver.m rawdraw/os_generic.c ping.c httping.o
- gcc -o cnping $^ -x objective-c -framework Cocoa -framework QuartzCore -lm -lpthread
+ $(CC) -o cnping $^ -x objective-c -framework Cocoa -framework QuartzCore -lm -lpthread
searchnet : rawdraw/os_generic.o ping.o searchnet.o
- gcc $(CFLAGS) -o $@ $^ -lpthread
+ $(CC) $(CFLAGS) -o $@ $^ -lpthread
linuxinstall : cnping
sudo rm -f /usr/local/bin/cnping