aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/buildsys/win/bmake-bcc-ext.inc
blob: ff26dc12b8c26c0a7596898d87693c1aca416f9f (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
# build class specific settings

INCPATH=$(INCPATH) -I$(FLEXTINC)
LIBPATH=$(LIBPATH) -L$(FLEXTLIB)
LIBS=$(LIBS) $(FLEXTNAME).lib

##############################################

# default target
_build_: $(TARGET) 

$(OUTPATH): 
	if not exist $@ mkdir $@ > nul

$(TARGETPATH): $(OUTPATH)
	if not exist $@ mkdir $@ > nul

SETUPFUNCTION=$(NAME)_setup

$(TARGETPATH)\$(NAME).def: $(TARGETPATH)
	@echo EXPORTS $(SETUPFUNCTION) = _$(SETUPFUNCTION) > $@
# this next line fixes a strange problem with implib - lacking underscore?!
	@echo IMPORTS _rtext_retext=PD.rtext_retext >> $@

$(TARGET) :: $(TARGETPATH)\$(NAME).def

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

{$(SRCDIR)}.c{}.obj:
	bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $<

$(TARGET) :: $(TARGETPATH)

$(TARGET) :: $(OBJS)
	@cd $(TARGETPATH)
	ilink32 $(LDFLAGS) $(LIBPATH) -L. $(OBJS) ,$(<F),,$(LIBS),$(NAME).def
	@cd ..\..

##############################################
# remove build

_clean_:
	-del /q $(TARGETPATH)\*.* > nul
	-rmdir /q $(TARGETPATH) > nul

##############################################

$(INSTPATH):
	if not exist $@ mkdir $@ > nul

_install_: $(INSTPATH) 
	copy $(TARGET) $(INSTPATH) > nul