This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
magicka/utils/magiedit/GNUmakefile

33 lines
555 B
Makefile
Raw Normal View History

2017-03-18 21:49:46 +00:00
CC=cc
2018-10-26 04:20:45 +00:00
CFLAGS=-I../../deps/odoors/ -DANSI_PATH="\"$(ANSI_PATH)\"" -DDRAFT_PATH="\"$(DRAFT_PATH)\""
2017-03-18 21:49:46 +00:00
DEPS = main.c
OS = $(shell uname -s)
ODOORS = ../../deps/odoors/libs-${OS}/libODoors.a
2018-10-26 04:20:45 +00:00
ifeq ($(OS), SunOS)
EXTRA_LIBS = -lsocket
endif
2017-03-18 21:49:46 +00:00
ifeq ($(OS), Haiku)
EXTRA_LIBS = -lnetwork
endif
2017-03-18 21:49:46 +00:00
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)
2017-03-18 21:49:46 +00:00
.PHONY: clean
clean:
rm -f $(OBJ) magiedit