From ab157baf15984b6e967c3fadf9784e3a7c92fc36 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Mon, 23 May 2022 12:45:42 +0000
Subject: [PATCH] Allow for dev build and release build

---
 Makefile |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 420b74c..c7ec091 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,13 @@
 CC=gcc
 _OBJ=main.o dns.o slist.o
 _DEPS=dns.h servers.h slist.h
-IDIR=include
-CFLAGS=-Wall -g -lpthread
-ODIR=obj
-SRCDIR=src
+CFLAGS=-Wall -lpthread
 
-DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
-OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
+ifeq ($(DEV),1)
+	CFLAGS += -g
+else
+	CFLAGS += -O2 -flto
+endif
 
 default: dnscomp
 

--
Gitblit v1.10.0