aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/makefile.pd-bcc
blob: f7899c6676da55541da16a4c2a4f37b2846cf34d (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# flext - C++ layer for Max/MSP and pd (pure data) externals
# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
#
# Makefile for BorlandC++ 
#
# usage: make -f makefile.bcc
#
# ---------------------------------------------
#
# note: no threading support for BorlandC++
#
# ---------------------------------------------

!include config-pd-bcc.txt

SOURCE=source

NAME=flext
TARGET=pdwin  # appendix to lib name

# includes
INCPATH=-I$(BCCPATH)\include -I$(PDPATH)\src -I$(SOURCE)

!ifdef SNDOBJ
INCPATH=$(INCPATH) -I$(SNDOBJ)
!endif

# compiler definitions and flags
DEFS=-DFLEXT_SYS=2
CFLAGS=-6 -O2 -OS -ff -tWD 



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

# all the source files from the package
!include make-files.txt

!ifdef SNDOBJ
SRCS=$(SRCS) $(SRCS_SNDOBJ)
HDRS=$(HDRS) $(HDRS_SNDOBJ)
!endif

#default target
all: $(OUTPATH)\$(NAME)-$(TARGET).lib

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

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

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

#.PATH.obj=$(OUTPATH)


DIR="/"

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

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

$(OUTPATH)\$(NAME)-$(TARGET).lib:: $(OUTPATH)

$(OUTPATH)\$(NAME)-$(TARGET).lib:: $(OBJS) 
	@-del "$<"
	cd $(OUTPATH)
	tlib "..\$<" +$(**: = +)
	cd ..
!if $d(INSTDIR) && "$(INSTDIR)" != ""
	@-if not exist $(INSTDIR) mkdir $(INSTDIR)
	copy $< $(INSTDIR) >nul
	copy $(SOURCE)\*.h $(INSTDIR) >nul
!endif