mirror of
https://github.com/DarkPlacesEngine/dpmodel.git
synced 2024-11-23 20:42:07 +00:00
6b4a42106c
git-svn-id: svn://svn.icculus.org/twilight/trunk/dpmodel@5728 d7cf8633-e32d-0410-b094-e92efae38249
45 lines
672 B
Makefile
45 lines
672 B
Makefile
##### Win32 variables #####
|
|
|
|
WIN32_EXE=dpmodel.exe
|
|
WIN32_LDFLAGS=-lm
|
|
|
|
##### Unix variables #####
|
|
|
|
UNIX_EXE=dpmodel
|
|
UNIX_LDFLAGS=-lm
|
|
|
|
##### Common variables #####
|
|
|
|
CC=gcc
|
|
CFLAGS=-MD -Wall -O2
|
|
|
|
ifdef windir
|
|
CMD_RM=del
|
|
else
|
|
CMD_RM=rm -f
|
|
endif
|
|
|
|
##### Commands #####
|
|
|
|
.PHONY: all mingw clean
|
|
|
|
all:
|
|
ifdef windir
|
|
$(MAKE) EXE=$(WIN32_EXE) LDFLAGS="$(WIN32_LDFLAGS)" $(WIN32_EXE)
|
|
else
|
|
$(MAKE) EXE=$(UNIX_EXE) LDFLAGS="$(UNIX_LDFLAGS)" $(UNIX_EXE)
|
|
endif
|
|
|
|
mingw:
|
|
@$(MAKE) EXE=$(WIN32_EXE) LDFLAGS="$(WIN32_LDFLAGS)" $(WIN32_EXE)
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) -c $*.c
|
|
|
|
$(EXE): dpmodel.o
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
clean:
|
|
-$(CMD_RM) $(WIN32_EXE)
|
|
-$(CMD_RM) $(UNIX_EXE)
|
|
-$(CMD_RM) *.o
|