187cf02903
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>
28 lines
370 B
Makefile
28 lines
370 B
Makefile
CC=cc
|
|
|
|
DEPS = main.c
|
|
|
|
OBJ = main.o
|
|
|
|
OS = $(shell uname -s)
|
|
ifeq ($(OS), SunOS)
|
|
EXTRA_LIBS = -lsocket
|
|
endif
|
|
%.o: %.c $(DEPS)
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
JSMN = ../../deps/jsmn/libjsmn.a
|
|
|
|
all: magichat
|
|
|
|
$(JSMN):
|
|
cd ../../deps/jsmn/ && $(MAKE)
|
|
|
|
magichat: $(OBJ) $(JSMN)
|
|
$(CC) -o magichat -o $@ $^ $(LDFLAGS) $(EXTRA_LIBS)
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
rm -f $(OBJ) magichat
|