]> Shamusworld >> Repos - thunder/blob - makefile
Initial import (for historical reasons).
[thunder] / makefile
1 #
2 # Makefile for Thunder SDL
3 #
4
5 # Uncomment the following lines to compile for Win32
6
7 SYSTYPE   = __GCCWIN32__
8 EXESUFFIX = .exe
9 GLLIB     = opengl32
10 ICON      = thunder-ico.o
11
12 # Uncomment the following lines to compile for *nix
13
14 #SYSTYPE   = __GCCUNIX__
15 #EXESUFFIX =
16 #GLLIB     = GL
17 #ICON      =
18
19 CC         = gcc
20 LD         = gcc
21 TARGET     = thunder
22
23 SDL_CFLAGS = -I/c/mingw/include/SDL -Dmain=SDL_main
24 SDL_CONFIG = /mingw/bin/sdl-config
25 SDL_LIBS   = -L/c/mingw/lib -lmingw32 -lSDLmain -lSDL -mwindows
26
27 # DEFS   = -DX86_ASM -DLSB_FIRST
28 DEFS   =
29 CFLAGS = -fstrength-reduce -fomit-frame-pointer -O2 -Wall -Wno-unused \
30          -Wno-uninitialized -Wno-comment $(SDL_CFLAGS)
31 LIBS   = -lstdc++ $(SDL_LIBS)
32 OBJS   = obj/log.o obj/v6809.o obj/screen.o obj/gui.o obj/resource.o obj/thunder.o $(ICON)
33
34 all: obj $(TARGET)
35
36 clean:
37         rm -rf obj
38         rm -f ./$(TARGET)$(EXESUFFIX)
39
40 obj:
41         mkdir obj
42
43 $(TARGET): $(OBJS)
44         $(LD) $(LDFLAGS) -o $@$(EXESUFFIX) $(OBJS) $(LIBS)
45 #       strip --strip-all $(TARGET)$(EXESUFFIX)
46 #       upx -9 $(TARGET)$(EXESUFFIX)
47
48 #obj/%.o: src/%.c
49 #       $(CC) -c $< -o $@
50
51 #obj/%.o: src/%.cpp
52 obj/%.o: %.cpp %.h
53         $(CC) $(CFLAGS) -c $< -o $@
54
55 obj/%.o: %.cpp
56         $(CC) $(CFLAGS) -c $< -o $@
57
58 obj/%.o: %.asm %.h
59         nasm -f coff $< -o $@