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

INCPATH += -I$(FLEXTINC)
LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)

ifdef SHARED
LIBS += $(FLEXTSHLIB)/lib$(FLEXTNAME).dll
else
LIBS += -l$(FLEXTNAME)
endif

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

# default target
_build_: $(TARGET)

#$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
#	touch $@

$(OUTPATH):
	-cmd /c "mkdir $(subst /,\,$@)"

$(TARGETPATH): $(OUTPATH)
	-cmd /c "mkdir $(subst /,\,$@)"

$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp
	$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@

$(TARGETPATH)/%.o : $(SRCDIR)/%.c
	$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@

$(TARGET) :: $(TARGETPATH)

$(TARGET) :: $(COBJS) $(CPPOBJS)
	$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
	-strip --strip-unneeded $@

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

_clean_:
	-cmd /c "del /q $(subst /,\,$(TARGETPATH)/*.*)" > nul
	-cmd /c "rmdir /q $(subst /,\,$(TARGETPATH))" > nul

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

$(INSTPATH):
	-cmd /c "mkdir $(subst /,\,$@)"

_install_: $(INSTPATH)
	cmd /c "copy $(subst /,\,$(TARGET) $(INSTPATH))"