Imported kball_final_src_16dec2004.tar.gz
[kball.git] / makefile
blob4fd7b814387150bd03c01890b928340df6095107
1 # ------------------------------------------------------------------------
2 # KBall makefile
3 # By Kronoman
4 # Copyright (c) 2003, 2004
5 # Thanks to Schwarzung for the help on making the original makefile system.
6 # ------------------------------------------------------------------------
8 # This has the target platform defined, this is modified by fix.bat or fix.sh
9 include target.os
11 # Suggested by GNU Coding Stardards
12 SHELL = /bin/sh
14 # ===============================================
15 # Target binary name without extension
16 BINARY = kball
18 # Source directory
19 SRCDIR = src
21 # Include directory
22 INCDIR = include
24 # Source code suffix (.c, .cpp, etc)
25 SRCSUF = .cpp
27 # Simple source code test file (must be in same dir as makefile for now) :(
28 # The extension will be taken from SRCSUF, don't put it!
29 TESTFILE = test
30 # ===============================================
33 # -----------------------------
34 # -- Platform specific stuff --
35 # -----------------------------
37 # ------------------
38 # DJGPP target
39 # ------------------
40 ifeq ($(TARGET),DJGPP)
42 PLATFORMDIR=djgpp
44 # compiler to invoque
45 GCC = gxx
47 # Binary file suffix
48 BINSUF = dos.exe
49 # object suffix
50 OBJSUF = .o
52 # If you need extra link options (like more librarys, add to LFLAGS var)
53 LFLAGS = -s -laldmb -ldumb -lalleg
55 # Compiler flags
56 CFLAGS = -I$(INCDIR) -Wall -O3
57 endif
59 # ------------------
60 # MingW32
61 # ------------------
62 ifeq ($(TARGET),MINGW32)
64 PLATFORMDIR=mingw32
66 GCC = g++
68 # Binary file suffix
69 BINSUF = _w32.exe
70 OBJSUF = .o
72 # If you need extra link options (like more librarys, add to LFLAGS var)
73 LFLAGS = -Wl,--subsystem,windows -s -laldmb -ldumb -lalleg
75 # Compiler flags
76 CFLAGS = -I$(INCDIR) -Wall -O3
77 endif
79 # ------------------
80 # Linux
81 # ------------------
82 ifeq ($(TARGET),LINUX)
84 PLATFORMDIR=linux
86 GCC = g++
88 # Binary file suffix
89 BINSUF = _linux.bin
90 OBJSUF = .o
92 # If you need extra link options (like more librarys, add to LFLAGS var)
93 LFLAGS = -s -laldmb -ldumb `allegro-config --libs`
95 # Compiler flags
96 CFLAGS = -I$(INCDIR) -Wall -O3
97 endif
99 # ---------------------------------
100 # -- Platform non-specific stuff --
101 # ---------------------------------
103 OBJDIR = obj/$(PLATFORMDIR)
104 BINDIR = bin
106 # -- The rules for build are in this file --
107 include makefile.all