aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample/source/makefile.bcc
blob: e9e624b21d6619ad101b72597e11fe366bd1c157 (plain)
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
# xsample - extended sample objects for Max/MSP and pd (pure data)
# Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
#
# Makefile for BorlandC++ 
#
# usage: make -f makefile.bcc
#
# ---------------------------------------------

NAME=xsample
SETUPFUNCTION=$(NAME)_setup

# where to put the build
OUTPATH=..\bcc

# flext stuff
FLEXTPATH=..\..\flext  ### EDIT! ##
TARGET=pdwin

# paths
BCCPATH=c:\programme\prog\bcc55  	### EDIT! ##
PDPATH=c:\programme\audio\pd		### EDIT! ##

# includes, libs
INCPATH=-I$(BCCPATH)\include -I$(PDPATH)\src -I$(FLEXTPATH)\source
LIBPATH=-L$(BCCPATH)\lib -L$(PDPATH)\lib 
LIBS=cw32.lib import32.lib C0D32.OBJ

# compiler definitions and flags
DEFS=-DPD -DNT 
CFLAGS=-6 -O2 -OS -ff -tWD 


# the rest can stay untouched
# ----------------------------------------------

# all the source files from the package
SRCS= main.cpp inter.cpp record.cpp play.cpp groove.cpp
HDRS= main.h inter.ci

OBJS= $(SRCS:.cpp=.obj)

# default target
all: $(OUTPATH)\$(NAME).dll

# remove build
clean:
	-del /s /q $(OUTPATH) > nul
	rmdir $(OUTPATH)

# ----------------------------------------------

$(SRCS): $(HDRS)
	-touch $<

.PATH.OBJ=$(OUTPATH)

.cpp.obj:
	bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(OUTPATH) $<

$(OUTPATH):
	-@if not exist $< mkdir $<

$(OUTPATH)\pd.lib: $(PDPATH)\bin\pd.dll
	implib -a $@ $**

$(OUTPATH)\$(NAME).def:
	@echo EXPORTS $(SETUPFUNCTION) = _$(SETUPFUNCTION) > $<

$(OUTPATH)\$(NAME).dll :: $(OUTPATH) $(OUTPATH)\$(NAME).def $(OUTPATH)\pd.lib 

$(OUTPATH)\$(NAME).dll :: $(OBJS) 
	ilink32 -C -Tpd $(LIBPATH) $** ,$<,,$(LIBS) $(OUTPATH)\pd.lib $(FLEXTPATH)\pd-bcc\flext-$(TARGET).lib,$(OUTPATH)\$(NAME).def