ed32c56567efcfcc9dd426c84e88c4f370d398d8
[kraptor.git] / makefile
blobed32c56567efcfcc9dd426c84e88c4f370d398d8
1 # ------------------------------------------------------------------------
2 # Generic makefile
3 # By Kronoman
4 # Thanks to Schwarzung for the help on making the original makefile system.
5 # ------------------------------------------------------------------------
7 # This has the target platform defined, this is modified by fix.bat or fix.sh
8 include target.os
10 # Suggested by GNU Coding Stardards
11 SHELL = /bin/sh
13 # ===============================================
14 # Target binary name without extension
15 BINARY = kraptor
17 # Source directory
18 SRCDIR = src
20 # Include directory
21 INCDIR = include
23 # Source code suffix (.c, .cpp, etc)
24 SRCSUF = .c
26 # Simple source code test file (must be in same dir as makefile for now) :(
27 # The extension will be taken from SRCSUF, don't put it!
28 TESTFILE = test
29 # ===============================================
32 # -----------------------------
33 # -- Platform specific stuff --
34 # -----------------------------
36 # ------------------
37 # DJGPP target
38 # ------------------
39 ifeq ($(TARGET),DJGPP)
41 PLATFORMDIR=djgpp
43 # compiler to invoque
44 GCC = gcc
45 # GPP = gxx
47 # Binary file suffix
48 BINSUF = .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 = gcc
67 # GPP = g++
69 # Binary file suffix
70 BINSUF = _w32.exe
71 OBJSUF = .o
73 # If you need extra link options (like more librarys, add to LFLAGS var)
74 LFLAGS = -s -mwindows -laldmb -ldumb -lalleg
76 # Compiler flags
77 CFLAGS = -I$(INCDIR) -Wall -O3
78 endif
80 # ------------------
81 # Linux
82 # ------------------
83 ifeq ($(TARGET),LINUX)
85 PLATFORMDIR=linux
87 GCC = gcc
88 # GPP = g++
90 # Binary file suffix
91 BINSUF = _linux.bin
92 OBJSUF = .o
94 # If you need extra link options (like more librarys, add to LFLAGS var)
95 LFLAGS = -laldmb -ldumb `allegro-config --libs`
97 # Compiler flags
98 CFLAGS = -I$(INCDIR) -Wall -O3
99 endif
101 # ---------------------------------
102 # -- Platform non-specific stuff --
103 # ---------------------------------
105 OBJDIR = obj/$(PLATFORMDIR)
106 BINDIR = bin
108 # -- The rules for build are in this file --
109 include makefile.all