af8936c02e
Hope I didn't break things!
32 lines
490 B
Makefile
32 lines
490 B
Makefile
CC=cc
|
|
CFLAGS=-I../../deps/odoors/
|
|
DEPS = main.c
|
|
OS = $(shell uname -s)
|
|
ODOORS = ../../deps/odoors/libs-${OS}/libODoors.a
|
|
|
|
ifeq ($(OS), SunOS)
|
|
EXTRA_LIBS = -lsocket
|
|
endif
|
|
|
|
ifeq ($(OS), Haiku)
|
|
EXTRA_LIBS = -lnetwork
|
|
endif
|
|
|
|
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) $(EXTRA_LIBS)
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
rm -f $(OBJ) magiedit
|