-
Notifications
You must be signed in to change notification settings - Fork 8
/
makefile.app.mingw-sdl
73 lines (56 loc) · 2.63 KB
/
makefile.app.mingw-sdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Makefile for brandy under Windows x86 / x64 with MinGW using Cygwin as the
# toolchain
# Find MinGW gcc
compiler=$(shell which i686-w64-mingw32-gcc.exe 2>/dev/null)
MINGWPATH=/usr/i686-w64-mingw32/sys-root/mingw
ifeq ($(compiler),)
compiler=$(shell which x86_64-w64-mingw32-gcc.exe 2>/dev/null)
MINGWPATH=/usr/x86_64-w64-mingw32/sys-root/mingw
ifeq ($(compiler),)
$(error Unable to find MinGW gcc compiler)
endif
endif
CC = $(compiler)
LD = $(compiler)
STRIP = strip
ADDFLAGS = ${BRANDY_BUILD_FLAGS}
include build/git.mk
#CFLAGS = -g -DDEBUG -I$(MINGWPATH)/include/SDL -DUSE_SDL -DCYGWINBUILD -DDEFAULT_IGNORE -DBRANDYAPP -D__USE_MINGW_ANSI_STDIO=1 -Wall $(GITFLAGS) $(ADDFLAGS)
#CFLAGS = -g -I$(MINGWPATH)/include/SDL -DUSE_SDL -DCYGWINBUILD -DDEFAULT_IGNORE -DBRANDYAPP -D__USE_MINGW_ANSI_STDIO=1 -Wall $(GITFLAGS) $(ADDFLAGS)
CFLAGS = -O3 -I$(MINGWPATH)/include/SDL -DUSE_SDL -DCYGWINBUILD -DDEFAULT_IGNORE -DBRANDYAPP -D__USE_MINGW_ANSI_STDIO=1 -Wall $(GITFLAGS) $(ADDFLAGS)
LDFLAGS +=
LIBS = -lm $(MINGWPATH)/lib/libSDL.a -lws2_32 -mwindows $(MINGWPATH)/lib/libdxguid.a $(MINGWPATH)/lib/libwinmm.a $(MINGWPATH)/lib/libdl.a $(MINGWPATH)/lib/libpsapi.a $(MINGWPATH)/lib/libwinpthread.a
SRCDIR = src
OBJ = $(SRCDIR)/variables.o $(SRCDIR)/tokens.o $(SRCDIR)/graphsdl.o \
$(SRCDIR)/strings.o $(SRCDIR)/statement.o $(SRCDIR)/stack.o \
$(SRCDIR)/miscprocs.o $(SRCDIR)/mainstate.o $(SRCDIR)/lvalue.o \
$(SRCDIR)/keyboard.o $(SRCDIR)/iostate.o $(SRCDIR)/heap.o \
$(SRCDIR)/functions.o $(SRCDIR)/fileio.o $(SRCDIR)/evaluate.o \
$(SRCDIR)/errors.o $(SRCDIR)/mos.o $(SRCDIR)/editor.o \
$(SRCDIR)/convert.o $(SRCDIR)/commands.o $(SRCDIR)/brandy.o \
$(SRCDIR)/assign.o $(SRCDIR)/net.o $(SRCDIR)/mos_sys.o \
$(SRCDIR)/soundsdl.o $(SRCDIR)/app.o
SRC = $(SRCDIR)/variables.c $(SRCDIR)/tokens.c $(SRCDIR)/graphsdl.c \
$(SRCDIR)/strings.c $(SRCDIR)/statement.c $(SRCDIR)/stack.c \
$(SRCDIR)/miscprocs.c $(SRCDIR)/mainstate.c $(SRCDIR)/lvalue.c \
$(SRCDIR)/keyboard.c $(SRCDIR)/iostate.c $(SRCDIR)/heap.c \
$(SRCDIR)/functions.c $(SRCDIR)/fileio.c $(SRCDIR)/evaluate.c \
$(SRCDIR)/errors.c $(SRCDIR)/mos.c $(SRCDIR)/editor.c \
$(SRCDIR)/convert.c $(SRCDIR)/commands.c $(SRCDIR)/brandy.c \
$(SRCDIR)/assign.c $(SRCDIR)/net.c $(SRCDIR)/mos_sys.c \
$(SRCDIR)/soundsdl.c $(SRCDIR)/app.c
brandyapp: $(OBJ)
$(LD) $(LDFLAGS) -o brandyapp $(OBJ) $(LIBS)
include build/depends.mk
.c.o:
$(CC) $(CFLAGS) $< -c -o $@
recompile:
$(CC) $(CFLAGS) $(SRC) $(LIBS) -o brandy
nodebug:
$(CC) $(CFLAGS2) $(SRC) $(LIBS) -o brandy
$(STRIP) brandyapp.exe
check:
$(CC) $(CFLAGS) -Wall -O2 $(SRC) $(LIBS) -o brandyapp
clean:
rm -f $(SRCDIR)/*.o brandyapp.exe
all: brandyapp