| 1 | # Where is scummvm will be installed |
| 2 | SCUMMVMPATH=C:/scummvm |
| 3 | SRC=. |
| 4 | |
| 5 | ### Modify these paths |
| 6 | SDL_CFLAGS=-I$(SRC)/sdl/include |
| 7 | SDL_LIBS=-L$(SRC)/sdl/lib -lSDLmain -lSDL |
| 8 | |
| 9 | CC = gcc |
| 10 | CFLAGS = -g -Wno-multichar |
| 11 | DEFINES = -DUSE_ADLIB |
| 12 | LDFLAGS := |
| 13 | INCLUDES:= $(SDL_CFLAGS) -I./ -I./sound |
| 14 | CPPFLAGS= $(DEFINES) $(INCLUDES) |
| 15 | LIBS = -lmingw32 $(SDL_LIBS) -mwindows -mconsole |
| 16 | |
| 17 | EXEC=scummvm.exe |
| 18 | |
| 19 | INCS = scumm.h scummsys.h stdafx.h |
| 20 | |
| 21 | OBJS = actor.o boxes.o costume.o gfx.o object.o resource.o \ |
| 22 | saveload.o script.o scummvm.o sound.o string.o \ |
| 23 | sys.o verbs.o sdl.o script_v1.o script_v2.o debug.o gui.o \ |
| 24 | sound/imuse.o sound/fmopl.o sound/adlib.o sound/gmidi.o debugrl.o \ |
| 25 | akos.o |
| 26 | |
| 27 | .cpp.o: |
| 28 | $(CC) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o |
| 29 | |
| 30 | all: $(EXEC) |
| 31 | |
| 32 | $(EXEC): $(OBJS) |
| 33 | $(CC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) |
| 34 | |
| 35 | clean: |
| 36 | rm -f $(OBJS) $(EXEC) |
| 37 | |
| 38 | install: $(EXEC) |
| 39 | mkdir -p $(SCUMMVMPATH) |
| 40 | strip scummvm.exe -o $(SCUMMVMPATH)/scummvm.exe |
| 41 | cp copying.txt $(SCUMMVMPATH)/copying.txt |
| 42 | cp readme.txt $(SCUMMVMPATH)/readme.txt |
| 43 | cp whatsnew.txt $(SCUMMVMPATH)/whatsnew.txt |
| 44 | cp SDL/README-SDL.txt $(SCUMMVMPATH)/README-SDL.txt |
| 45 | cp SDL/lib/SDL.dll $(SCUMMVMPATH)/SDL.dll |