More GNUmakefile cleanups.

With the normalization of magimail's Makefile,
we can further simplify this logic.

Integrate the WWW logic into GNUmakefile.common.

Remove the custom `Makefile.sunos` files: just
use a conditional in the Makefile.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
This commit is contained in:
Dan Cross
2018-10-09 15:55:12 +00:00
committed by Andrew Pamment
parent 264b5688b2
commit 187cf02903
18 changed files with 92 additions and 703 deletions

View File

@@ -1,7 +1,12 @@
CC=cc
CFLAGS=-I../../deps/odoors/
DEPS = main.c
ODOORS = ../../deps/odoors/libs-`uname -s`/libODoors.a
OS = $(shell uname -s)
ODOORS = ../../deps/odoors/libs-${OS}/libODoors.a
ifeq ($(OS), SunOS)
EXTRA_LIBS = -lsocket
endif
OBJ = main.o
@@ -14,7 +19,7 @@ ${ODOORS}:
$(CC) -c -o $@ $< $(CFLAGS)
magiedit: $(OBJ) $(ODOORS)
$(CC) -o magiedit -o $@ $^ $(CFLAGS) $(ODOORS)
$(CC) -o magiedit -o $@ $^ $(CFLAGS) $(ODOORS) $(EXTRA_LIBS)
.PHONY: clean

View File

@@ -1,22 +0,0 @@
CC=cc
CFLAGS=-I../../deps/odoors/
DEPS = main.c
ODOORS = ../../deps/odoors/libs-`uname -s`/libODoors.a
OBJ = main.o
all: magiedit
${ODOORS}:
cd ../../deps/odoors && $(MAKE) MAKEFLAGS=
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magiedit: $(OBJ) $(ODOORS)
$(CC) -o magiedit -o $@ $^ $(CFLAGS) $(ODOORS) -lsocket
.PHONY: clean
clean:
rm -f $(OBJ) magiedit