File: makefile

package info (click to toggle)
kraptor 0.0.20040403-6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 12,876 kB
  • ctags: 781
  • sloc: ansic: 7,107; makefile: 109; sh: 63
file content (109 lines) | stat: -rw-r--r-- 2,221 bytes parent folder | download | duplicates (4)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# ------------------------------------------------------------------------
# Generic makefile
# By Kronoman
# Thanks to Schwarzung for the help on making the original makefile system.
# ------------------------------------------------------------------------

# This has the target platform defined, this is modified by fix.bat or fix.sh
include target.os

# Suggested by GNU Coding Stardards
SHELL = /bin/sh

# ===============================================
# Target binary name without extension
BINARY = kraptor

# Source directory
SRCDIR = src

# Include directory
INCDIR = include

# Source code suffix (.c, .cpp, etc)
SRCSUF = .c

# Simple source code test file (must be in same dir as makefile for now) :(
# The extension will be taken from SRCSUF, don't put it!
TESTFILE = test
# ===============================================


# -----------------------------
# -- Platform specific stuff --
# -----------------------------

# ------------------
# DJGPP target
# ------------------
ifeq ($(TARGET),DJGPP)

PLATFORMDIR=djgpp

# compiler to invoque
GCC = gcc
# GPP = gxx

# Binary file suffix
BINSUF = .exe
# object suffix
OBJSUF = .o

# If you need extra link options (like more librarys, add to LFLAGS var)
LFLAGS = -s -laldmb -ldumb -lalleg

# Compiler flags
CFLAGS = -I$(INCDIR) -Wall -O3
endif

# ------------------
# MingW32
# ------------------
ifeq ($(TARGET),MINGW32)

PLATFORMDIR=mingw32

GCC = gcc
# GPP = g++

# Binary file suffix
BINSUF = _w32.exe
OBJSUF = .o

# If you need extra link options (like more librarys, add to LFLAGS var)
LFLAGS = -s -mwindows -laldmb -ldumb -lalleg

# Compiler flags
CFLAGS = -I$(INCDIR) -Wall -O3
endif

# ------------------
# Linux
# ------------------
ifeq ($(TARGET),LINUX)

PLATFORMDIR=linux

GCC = gcc
# GPP = g++

# Binary file suffix
BINSUF = _linux.bin
OBJSUF = .o

# If you need extra link options (like more librarys, add to LFLAGS var)
LFLAGS = -laldmb -ldumb `allegro-config --libs`

# Compiler flags
CFLAGS = -I$(INCDIR) -Wall -O3
endif

# ---------------------------------
# -- Platform non-specific stuff --
# ---------------------------------

OBJDIR = obj/$(PLATFORMDIR)
BINDIR = bin

# -- The rules for build are in this file --
include makefile.all