Makefile
author Ryan C. Gordon <icculus@icculus.org>
Thu, 23 Aug 2001 18:01:43 +0000
changeset 74 a4a5066fb640
parent 71 105bdb041c03
child 81 0a0cd7fb0208
permissions -rw-r--r--
Compiles and runs on Visual C. What an uphill climb THAT was.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
# PhysicsFS -- A filesystem abstraction.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
#  Please see the file LICENSE in the source's root directory.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
#   This file written by Ryan C. Gordon.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
# Makefile for building PhysicsFS on Unix-like systems. Follow the
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
#  instructions for editing this file, then run "make" on the command line.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
# Set to your liking.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
CC = gcc
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
LINKER = gcc
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
# If this makefile fails to detect Cygwin correctly, or you want to force
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
#  the build process's behaviour, set it to "true" or "false" (w/o quotes).
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
#cygwin := true
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
#cygwin := false
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
cygwin := autodetect
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
# Set this to true if you want to create a debug build.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
#debugging := false
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
debugging := true
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
# Set the archive types you'd like to support.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
#  Note that various archives may need external libraries.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
#-----------------------------------------------------------------------------#
43
8a68085acebf ZIP file support.
Ryan C. Gordon <icculus@icculus.org>
parents: 36
diff changeset
    40
use_archive_zip := true
21
b1ea58d70a56 Archive implementation (Build Groupfiles), other tweaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 20
diff changeset
    41
use_archive_grp := true
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
# Set to "true" if you'd like to build a DLL. Set to "false" otherwise.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
#build_dll := false
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
build_dll := true
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
# Set one of the below. Currently, none of these are used.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
#use_asm = -DUSE_I386_ASM
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
use_asm = -DUSE_PORTABLE_C
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    56
#-----------------------------------------------------------------------------#
58
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
    57
# Set this to where you want PhysicsFS installed. It will put the
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
    58
#  files in $(install_prefix)/bin, $(install_prefix)/lib, and
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
    59
#  $(install_prefix)/include  ...
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
    60
#-----------------------------------------------------------------------------#
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
    61
install_prefix := /usr/local
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
    62
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
    63
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
    64
#-----------------------------------------------------------------------------#
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
# Everything below this line is probably okay.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    70
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    71
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    72
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    74
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    75
# CygWin autodetect.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    76
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    77
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    78
ifeq ($(strip $(cygwin)),autodetect)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    79
  ifneq ($(strip $(shell gcc -v 2>&1 |grep "cygwin")),)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    80
    cygwin := true
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    81
  else
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
    cygwin := false
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    83
  endif
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    84
endif
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    85
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    86
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    87
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    88
# Platform-specific binary stuff.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    89
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    90
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
ifeq ($(strip $(cygwin)),true)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    92
  # !!! FIXME
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    93
  build_dll := false
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    94
  # !!! FIXME
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    96
  ASM = nasmw
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    97
  EXE_EXT = .exe
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    98
  DLL_EXT = .dll
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    99
  STATICLIB_EXT = .a
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
  ASMOBJFMT = win32
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   101
  ASMDEFS = -dC_IDENTIFIERS_UNDERSCORED
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
  CFLAGS += -DC_IDENTIFIERS_UNDERSCORED
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
else
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
  ASM = nasm
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   105
  EXE_EXT =
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   106
  DLL_EXT = .so
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   107
  STATICLIB_EXT = .a
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   108
  ASMOBJFMT = elf
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   109
endif
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   110
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   111
ifeq ($(strip $(build_dll)),true)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   112
LIB_EXT := $(DLL_EXT)
34
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   113
SHAREDFLAGS += -shared
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   114
else
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   115
LIB_EXT := $(STATICLIB_EXT)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   116
endif
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   117
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   118
#-----------------------------------------------------------------------------#
58
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   119
# Version crapola.
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   120
#-----------------------------------------------------------------------------#
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   121
VERMAJOR := $(shell grep "define PHYSFS_VER_MAJOR" physfs.h | sed "s/\#define PHYSFS_VER_MAJOR //")
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   122
VERMINOR := $(shell grep "define PHYSFS_VER_MINOR" physfs.h | sed "s/\#define PHYSFS_VER_MINOR //")
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   123
VERPATCH := $(shell grep "define PHYSFS_VER_PATCH" physfs.h | sed "s/\#define PHYSFS_VER_PATCH //")
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   124
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   125
VERMAJOR := $(strip $(VERMAJOR))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   126
VERMINOR := $(strip $(VERMINOR))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   127
VERPATCH := $(strip $(VERPATCH))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   128
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   129
VERFULL := $(VERMAJOR).$(VERMINOR).$(VERPATCH)
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   130
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   131
#-----------------------------------------------------------------------------#
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   132
# General compiler, assembler, and linker flags.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   133
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   134
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   135
BINDIR := bin
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   136
SRCDIR := .
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   137
36
60b6076ae5c2 Added readline library to test program.
Ryan C. Gordon <icculus@icculus.org>
parents: 34
diff changeset
   138
CFLAGS += $(use_asm) -I$(SRCDIR) -I/usr/include/readline -D_REENTRANT -fsigned-char -DPLATFORM_UNIX
13
4f98eb8bbabb fixed typo
Ryan C. Gordon <icculus@icculus.org>
parents: 11
diff changeset
   139
CFLAGS += -Wall -Werror -fno-exceptions -fno-rtti -ansi -pedantic
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   140
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   141
LDFLAGS += -lm
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   142
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   143
ifeq ($(strip $(debugging)),true)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   144
  CFLAGS += -DDEBUG -g -fno-omit-frame-pointer
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   145
  LDFLAGS += -g -fno-omit-frame-pointer
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   146
else
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   147
  CFLAGS += -DNDEBUG -O2 -fomit-frame-pointer
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   148
  LDFLAGS += -O2 -fomit-frame-pointer
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   149
endif
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   150
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   151
ASMFLAGS := -f $(ASMOBJFMT) $(ASMDEFS)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   152
36
60b6076ae5c2 Added readline library to test program.
Ryan C. Gordon <icculus@icculus.org>
parents: 34
diff changeset
   153
TESTLDFLAGS := -lreadline
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   154
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   155
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   156
# Source and target names.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   157
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   158
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   159
BASELIBNAME := physfs
58
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   160
ifneq ($(strip $(cygwin)),true)
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   161
BASELIBNAME := lib$(strip $(BASELIBNAME))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   162
endif
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   163
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   164
MAINLIB := $(BINDIR)/$(strip $(BASELIBNAME))$(strip $(LIB_EXT))
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   165
34
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   166
TESTSRCS := test/test_physfs.c
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   167
69
546a95cc5591 Updates, corrections and enhancements to get this ported to win32.
Ryan C. Gordon <icculus@icculus.org>
parents: 60
diff changeset
   168
MAINSRCS := physfs.c archivers/dir.c
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   169
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   170
ifeq ($(strip $(use_archive_zip)),true)
74
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   171
  MAINSRCS += archivers/zip.c archivers/unzip.c
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   172
  CFLAGS += -DPHYSFS_SUPPORTS_ZIP
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   173
  ifeq ($(strip $(cygwin)),true)
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   174
    CFLAGS += -Izlibwin32
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   175
    ifeq ($(strip $(debugging)),true)
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   176
      LDFLAGS += zlibwin32/zlibstat_multid.lib  
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   177
    else
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   178
      LDFLAGS += zlibwin32/zlibstat_multir.lib  
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   179
    endif
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   180
  else
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   181
    LDFLAGS += -lz
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   182
  endif
71
105bdb041c03 More win32 updates.
Ryan C. Gordon <icculus@icculus.org>
parents: 69
diff changeset
   183
endif
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   184
22
49f6101707b4 More tweaks; GRP completely implemented. Everything builds clean.
Ryan C. Gordon <icculus@icculus.org>
parents: 21
diff changeset
   185
ifeq ($(strip $(use_archive_grp)),true)
49f6101707b4 More tweaks; GRP completely implemented. Everything builds clean.
Ryan C. Gordon <icculus@icculus.org>
parents: 21
diff changeset
   186
MAINSRCS += archivers/grp.c
49f6101707b4 More tweaks; GRP completely implemented. Everything builds clean.
Ryan C. Gordon <icculus@icculus.org>
parents: 21
diff changeset
   187
CFLAGS += -DPHYSFS_SUPPORTS_GRP
49f6101707b4 More tweaks; GRP completely implemented. Everything builds clean.
Ryan C. Gordon <icculus@icculus.org>
parents: 21
diff changeset
   188
endif
49f6101707b4 More tweaks; GRP completely implemented. Everything builds clean.
Ryan C. Gordon <icculus@icculus.org>
parents: 21
diff changeset
   189
69
546a95cc5591 Updates, corrections and enhancements to get this ported to win32.
Ryan C. Gordon <icculus@icculus.org>
parents: 60
diff changeset
   190
ifeq ($(strip $(cygwin)),true)
546a95cc5591 Updates, corrections and enhancements to get this ported to win32.
Ryan C. Gordon <icculus@icculus.org>
parents: 60
diff changeset
   191
MAINSRCS += platform/win32.c
74
a4a5066fb640 Compiles and runs on Visual C. What an uphill climb THAT was.
Ryan C. Gordon <icculus@icculus.org>
parents: 71
diff changeset
   192
CFLAGS += -DWIN32
69
546a95cc5591 Updates, corrections and enhancements to get this ported to win32.
Ryan C. Gordon <icculus@icculus.org>
parents: 60
diff changeset
   193
else
546a95cc5591 Updates, corrections and enhancements to get this ported to win32.
Ryan C. Gordon <icculus@icculus.org>
parents: 60
diff changeset
   194
MAINSRCS += platform/unix.c
546a95cc5591 Updates, corrections and enhancements to get this ported to win32.
Ryan C. Gordon <icculus@icculus.org>
parents: 60
diff changeset
   195
endif
546a95cc5591 Updates, corrections and enhancements to get this ported to win32.
Ryan C. Gordon <icculus@icculus.org>
parents: 60
diff changeset
   196
34
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   197
TESTEXE := $(BINDIR)/test_physfs$(EXE_EXT)
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   198
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   199
# Rule for getting list of objects from source
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   200
MAINOBJS1 := $(MAINSRCS:.c=.o)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   201
MAINOBJS2 := $(MAINOBJS1:.cpp=.o)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   202
MAINOBJS3 := $(MAINOBJS2:.asm=.o)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   203
MAINOBJS := $(foreach f,$(MAINOBJS3),$(BINDIR)/$(f))
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   204
MAINSRCS := $(foreach f,$(MAINSRCS),$(SRCDIR)/$(f))
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   205
34
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   206
TESTOBJS1 := $(TESTSRCS:.c=.o)
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   207
TESTOBJS2 := $(TESTOBJS1:.cpp=.o)
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   208
TESTOBJS3 := $(TESTOBJS2:.asm=.o)
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   209
TESTOBJS := $(foreach f,$(TESTOBJS3),$(BINDIR)/$(f))
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   210
TESTSRCS := $(foreach f,$(TESTSRCS),$(SRCDIR)/$(f))
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   211
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   212
CLEANUP = $(wildcard *.exe) $(wildcard *.obj) \
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   213
          $(wildcard $(BINDIR)/*.exe) $(wildcard $(BINDIR)/*.obj) \
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   214
          $(wildcard *~) $(wildcard *.err) \
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   215
          $(wildcard .\#*) core
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   216
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   217
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   218
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   219
# Rules.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   220
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   221
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   222
# Rules for turning source files into .o files
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   223
$(BINDIR)/%.o: $(SRCDIR)/%.cpp
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   224
	$(CC) -c -o $@ $< $(CFLAGS)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   225
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   226
$(BINDIR)/%.o: $(SRCDIR)/%.c
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   227
	$(CC) -c -o $@ $< $(CFLAGS)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   228
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   229
$(BINDIR)/%.o: $(SRCDIR)/%.asm
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   230
	$(ASM) $(ASMFLAGS) -o $@ $<
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   231
58
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   232
.PHONY: all clean distclean listobjs install
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   233
34
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   234
all: $(BINDIR) $(MAINLIB) $(TESTEXE)
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   235
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   236
$(MAINLIB) : $(BINDIR) $(MAINOBJS)
34
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   237
	$(LINKER) -o $(MAINLIB) $(LDFLAGS) $(SHAREDFLAGS) $(MAINOBJS)
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   238
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   239
$(TESTEXE) : $(MAINLIB) $(TESTOBJS)
36
60b6076ae5c2 Added readline library to test program.
Ryan C. Gordon <icculus@icculus.org>
parents: 34
diff changeset
   240
	$(LINKER) -o $(TESTEXE) $(LDFLAGS) $(TESTLDFLAGS) $(TESTOBJS) $(MAINLIB)
34
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   241
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   242
58
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   243
install: all
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   244
	mkdir -p $(install_prefix)/bin
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   245
	mkdir -p $(install_prefix)/lib
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   246
	mkdir -p $(install_prefix)/include
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   247
	cp $(SRCDIR)/physfs.h $(install_prefix)/include
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   248
	cp $(TESTEXE) $(install_prefix)/bin
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   249
ifeq ($(strip $(cygwin)),true)
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   250
	cp $(MAINLIB) $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   251
else
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   252
	cp $(MAINLIB) $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERFULL))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   253
	ln -sf $(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERFULL)) $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   254
	ln -sf $(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERFULL)) $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERMAJOR))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   255
	chmod 0755 $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERFULL))
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   256
	chmod 0644 $(install_prefix)/include/physfs.h
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   257
endif
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   258
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   259
$(BINDIR):
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   260
	mkdir -p $(BINDIR)
20
efdde0d21521 Implementation compiles and links with no actual archive support. No test
Ryan C. Gordon <icculus@icculus.org>
parents: 18
diff changeset
   261
	mkdir -p $(BINDIR)/archivers
18
bb03dd217a97 Changes for subdirs.
Ryan C. Gordon <icculus@icculus.org>
parents: 13
diff changeset
   262
	mkdir -p $(BINDIR)/platform
34
86c247b7be8d Added test binary.
Ryan C. Gordon <icculus@icculus.org>
parents: 22
diff changeset
   263
	mkdir -p $(BINDIR)/test
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   264
11
677e01f5109e Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents: 9
diff changeset
   265
distclean: clean
677e01f5109e Progress toward complete implementation continues...
Ryan C. Gordon <icculus@icculus.org>
parents: 9
diff changeset
   266
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   267
clean:
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   268
	rm -f $(CLEANUP)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   269
	rm -rf $(BINDIR)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   270
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   271
listobjs:
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   272
	@echo SOURCES:
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   273
	@echo $(MAINSRCS)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   274
	@echo
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   275
	@echo OBJECTS:
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   276
	@echo $(MAINOBJS)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   277
	@echo
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   278
	@echo BINARIES:
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   279
	@echo $(MAINLIB)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   280
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   281
showcfg:
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   282
	@echo "Using CygWin   : $(cygwin)"
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   283
	@echo "Debugging      : $(debugging)"
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   284
	@echo "ASM flag       : $(use_asm)"
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   285
	@echo "Building DLLs  : $(build_dll)"
58
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   286
	@echo "Install prefix : $(install_prefix)"
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   287
	@echo "PhysFS version : $(VERFULL)"
69
546a95cc5591 Updates, corrections and enhancements to get this ported to win32.
Ryan C. Gordon <icculus@icculus.org>
parents: 60
diff changeset
   288
	@echo "Supports .GRP  : $(use_archive_grp)"
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   289
	@echo "Supports .ZIP  : $(use_archive_zip)"
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   290
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   291
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   292
# This section is pretty much just for Ryan's use to make distributions.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   293
#  You Probably Should Not Touch.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   294
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   295
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   296
# These are the files needed in a binary distribution, regardless of what
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   297
#  platform is being used.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   298
BINSCOMMON := LICENSE.TXT physfs.h
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   299
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   300
.PHONY: package msbins win32bins nocygwin
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   301
package: clean
58
3b48a08a4892 Versioning stuff, install rule added.
Ryan C. Gordon <icculus@icculus.org>
parents: 56
diff changeset
   302
	cd .. ; mv physfs physfs-$(VERFULL) ; tar -cyvvf ./physfs-$(VERFULL).tar.bz2 --exclude="*CVS*" physfs-$(VERFULL) ; mv physfs-$(VERFULL) physfs
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   303
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   304
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   305
ifeq ($(strip $(cygwin)),true)
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   306
msbins: win32bins
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   307
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   308
win32bins: clean all
60
e5aade8e1b3f Added appropriate make install target.
Ryan C. Gordon <icculus@icculus.org>
parents: 58
diff changeset
   309
	echo -e "\r\n\r\n\r\nHEY YOU.\r\n\r\n\r\nTake a look at README-win32bins.txt FIRST.\r\n\r\n\r\n--ryan. (icculus@clutteredmind.org)\r\n\r\n" |zip -9rz ../physfs-win32bins-$(shell date +%m%d%Y).zip $(MAINLIB) $(EXTRAPACKAGELIBS) README-win32bins.txt
9
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   310
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   311
else
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   312
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   313
msbins: nocygwin
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   314
win32bins: nocygwin
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   315
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   316
nocygwin:
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   317
	@echo This must be done on a Windows box in the Cygwin environment.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   318
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   319
endif
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   320
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   321
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   322
# That's all, folks.
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   323
#-----------------------------------------------------------------------------#
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   324
1155788ccbe3 Initial add. Ways to go.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   325
# end of Makefile ...