Windows and Mac make files.
This commit is contained in:
parent
2fa40d8933
commit
13c8c9c05a
|
@ -7,3 +7,4 @@ blobwarsAttrition
|
|||
dist/*
|
||||
/blobwarsAttrition.exe
|
||||
/.errors
|
||||
build
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd ..
|
||||
|
||||
rm -rf dist
|
||||
make clean
|
||||
make
|
||||
make dist
|
||||
make src-dist
|
|
@ -0,0 +1,35 @@
|
|||
PROG = blobwarsAttrition
|
||||
CC = gcc
|
||||
PREFIX ?= /usr
|
||||
BIN_DIR ?= $(PREFIX)/bin
|
||||
DATA_DIR ?= /opt/$(PROG)
|
||||
LOCALE_DIR = $(PREFIX)/share/locale
|
||||
ICON_DIR = $(PREFIX)/share/icons/hicolor
|
||||
DESKTOP_DIR = $(PREFIX)/share/applications
|
||||
|
||||
DESTDIR ?=
|
||||
INST_BIN_DIR = $(DESTDIR)$(BIN_DIR)
|
||||
INST_DATA_DIR = $(DESTDIR)$(DATA_DIR)
|
||||
INST_LOCALE_DIR = $(DESTDIR)$(LOCALE_DIR)
|
||||
INST_ICON_DIR = $(DESTDIR)$(ICON_DIR)
|
||||
INST_DESKTOP_DIR = $(DESTDIR)$(DESKTOP_DIR)
|
||||
|
||||
SEARCHPATH += src/plat/unix
|
||||
_OBJS += unixInit.o
|
||||
|
||||
include common.mk
|
||||
|
||||
CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\"
|
||||
CXXFLAGS += -fms-extensions
|
||||
|
||||
LDFLAGS += `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm -lz -lpng
|
||||
|
||||
SHARED_FILES = LICENSE README.md data gfx manual music sound icons
|
||||
DIST_FILES = $(SHARED_FILES) locale $(PROG)
|
||||
SRC_DIST_FILES = $(SHARED_FILES) src makefile* common.mk
|
||||
|
||||
# linking the program.
|
||||
$(PROG): $(OBJS)
|
||||
$(CC) -o $@ $(OBJS) $(LDFLAGS)
|
||||
|
||||
.PHONY: dist
|
|
@ -0,0 +1,23 @@
|
|||
PROG = blobwarsAttrition.exe
|
||||
CC = x86_64-w64-mingw32-gcc
|
||||
SDLC = /usr/x86_64-w64-mingw32/bin/sdl2-config
|
||||
LOCALE_DIR = locale
|
||||
|
||||
SEARCHPATH += src/plat/win32
|
||||
_OBJS += win32Init.o
|
||||
|
||||
include common.mk
|
||||
|
||||
NPROCS = $(shell grep -c 'processor' /proc/cpuinfo)
|
||||
MAKEFLAGS += -j$(NPROCS)
|
||||
|
||||
CXXFLAGS += `$(SDLC) --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\"
|
||||
CXXFLAGS += -Wall -Wempty-body -ansi -pedantic -Werror -Wstrict-prototypes -Werror=maybe-uninitialized -Warray-bounds
|
||||
CXXFLAGS += -g -lefence
|
||||
CXXFLAGS += -fms-extensions -std=gnu11
|
||||
|
||||
LDFLAGS += `$(SDLC) --libs` -lm -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lSDL2main -lpng -lz
|
||||
|
||||
# linking the program.
|
||||
$(PROG): $(OBJS)
|
||||
$(CC) -o $@ $(OBJS) $(LDFLAGS) -L$(LIBPATH)
|
Loading…
Reference in New Issue