diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-24 09:27:07 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-24 09:28:01 -0800 |
commit | b40ad265448018d1a22d67db399568a2dfaf3cd2 (patch) | |
tree | cfcd0ff11c8f4c803cafdada16836cad065da5d6 /src/luasec/Makefile | |
parent | a788f80a92d3942d57036e7f9c3816c89111cc0a (diff) | |
download | teliva-b40ad265448018d1a22d67db399568a2dfaf3cd2.tar.gz |
more Makefile streamlining
Since everything is in my control there's no need to parameterize include paths. It's a struggle to get make to run when it should. Lying that something is phony stops working when it's a dependency. Commands get unnecessarily run. Just fucking run recursive makes directly in the target that depends on them.
Diffstat (limited to 'src/luasec/Makefile')
-rw-r--r-- | src/luasec/Makefile | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/luasec/Makefile b/src/luasec/Makefile index c495109..c3ae3c6 100644 --- a/src/luasec/Makefile +++ b/src/luasec/Makefile @@ -11,20 +11,19 @@ OBJS= \ WARN=-Wall -Wpedantic -Wshadow -BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS) -BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR) +BSD_CFLAGS=-O2 -fPIC $(WARN) $(DEFS) +BSD_LDFLAGS=-O -fPIC -shared -linux_CFLAGS=-g -O2 $(WARN) $(INCDIR) $(DEFS) +linux_CFLAGS=-g -O2 $(WARN) $(DEFS) macosx_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)' -macosx_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS) -macosx_LDFLAGS=-bundle -undefined dynamic_lookup $(LIBDIR) +macosx_CFLAGS=-O2 -fno-common $(WARN) $(DEFS) +macosx_LDFLAGS=-bundle -undefined dynamic_lookup INSTALL = install CC ?= gcc CCLD ?= $(MYENV) $(CC) -CFLAGS = $(linux_CFLAGS) -CFLAGS += $(MYCFLAGS) +CFLAGS = $(MYCFLAGS) LDFLAGS += $(MYLDFLAGS) AR= ar rc RANLIB= ranlib @@ -39,9 +38,8 @@ install: $(CMOD) $(LMOD) $(INSTALL) -m644 $(LMOD) $(DESTDIR)$(LUAPATH) $(INSTALL) -m644 https.lua $(DESTDIR)$(LUAPATH)/ssl -linux: $(OBJS) - $(AR) $(CMOD) $(OBJS) - $(RANLIB) $(CMOD) +linux: + @$(MAKE) $(CMOD) MYCFLAGS="$(linux_CFLAGS)" MYLDFLAGS="$(linux_LDFLAGS)" EXTRA="$(EXTRA)" bsd: @$(MAKE) $(CMOD) MYCFLAGS="$(BSD_CFLAGS)" MYLDFLAGS="$(BSD_LDFLAGS)" EXTRA="$(EXTRA)" @@ -49,6 +47,10 @@ bsd: macosx: @$(MAKE) $(CMOD) MYCFLAGS="$(macosx_CFLAGS)" MYLDFLAGS="$(macosx_LDFLAGS)" MYENV="$(macosx_ENV)" EXTRA="$(EXTRA)" +$(CMOD): $(OBJS) + $(AR) $(CMOD) $(OBJS) + $(RANLIB) $(CMOD) + clean: rm -f $(OBJS) $(CMOD) |