attempt to fix include copy
[AROS.git] / workbench / libs / gl / mmakefile.src
blob800b3b1a8916c4a1e400aba61431bc6d461c2a55
1 #   $Id$
4 include $(TOP)/config/make.cfg
6 #MM- workbench-libs-complete : workbench-libs-gl
8 #MM workbench-libs-gl : includes workbench-libs-gl-gen-includes
9 #MM- core-linklibs : linklibs-gl
11 #MM- linklibs-gl : workbench-libs-gl-linklib workbench-libs-gl-linklib-rel
12 #MM workbench-libs-gl-linklib : workbench-libs-gl-gen-stubs
13 #MM workbench-libs-gl-linklib-rel : workbench-libs-gl-gen-stubs
14 #MM workbench-libs-gl-gen-includes : workbench-libs-gl-setup
15 #MM workbench-libs-gl-gen-stubs : workbench-libs-gl-gen-includes
17 #MM- workbench-libs-gl-includes : workbench-libs-gl-includes-copy
20 # build the pass-through gl.library
23 GL_LIBRARY_SOURCES = \
24             gl_init
26 USER_INCLUDES := -I$(GENDIR)/$(CURDIR)/include
28 USER_LDFLAGS := -static
30 %build_module_simple mmake=workbench-libs-gl \
31         modname=gl modtype=library \
32         files="$(GL_LIBRARY_SOURCES)"
35 # build the gl.library support libs using genmodule generated API stubs
38 GL_LIB_SOURCES := \
39             gl_funcs.c \
40             $(wildcard $(GENDIR)/$(CURDIR)/*_stub.c) \
41             $(wildcard $(GENDIR)/$(CURDIR)/*_stubs.c) \
42             $(wildcard $(GENDIR)/$(CURDIR)/*_autoinit.c) \
43             $(wildcard $(GENDIR)/$(CURDIR)/*_getlibbase.c)
45 %build_linklib mmake=workbench-libs-gl-linklib libname=GL files=$(GL_LIB_SOURCES:.c=)
47 GL_RELLIB_SOURCES := \
48             gl_funcs.c \
49             $(wildcard $(GENDIR)/$(CURDIR)/*_relstub.c) \
50             $(wildcard $(GENDIR)/$(CURDIR)/*_relstubs.c) \
51             $(wildcard $(GENDIR)/$(CURDIR)/*_relautoinit.c) \
52             $(wildcard $(GENDIR)/$(CURDIR)/*_relgetlibbase.c)
54 %build_linklib mmake=workbench-libs-gl-linklib-rel libname=GL_rel files=$(GL_RELLIB_SOURCES:.c=)
56 #MM
57 workbench-libs-gl-gen-stubs: $(GENDIR)/$(CURDIR)/.stubs-generated
59 $(GENDIR)/$(CURDIR)/.stubs-generated : 
60         @$(ECHO) "Generating GL.library API stubs..."
61         @$(GENMODULE) -c $(SRCDIR)/$(CURDIR)/gl.conf -d $(GENDIR)/$(CURDIR) writefiles gl library
62         @$(TOUCH) $@
65 # use genmodule to generate the AROS gl.library API headers
68 #MM
69 workbench-libs-gl-gen-includes: $(GENDIR)/$(CURDIR)/.includes-generated
71 $(GENDIR)/$(CURDIR)/.includes-generated : $(GENMODULE)
72         @$(ECHO) "Generating GL.library API headers..."
73         @$(GENMODULE) -c $(SRCDIR)/$(CURDIR)/gl.conf -d $(GENDIR)/$(CURDIR)/include writeincludes gl library
74         @$(GENMODULE) -c $(SRCDIR)/$(CURDIR)/gl.conf -d $(GENDIR)/$(CURDIR)/include writelibdefs gl library
75         @$(GENMODULE) -c $(SRCDIR)/$(CURDIR)/gl.conf -d $(GENDIR)/include writeincludes gl library
76         @$(GENMODULE) -c $(SRCDIR)/$(CURDIR)/gl.conf -d $(AROS_INCLUDES) writeincludes gl library
77         @$(TOUCH) $@
79 INCLUDE_FILES := gla.h
81 %copy_includes mmake=workbench-libs-gl-includes-copy path=GL includes=$(INCLUDE_FILES)
83 #MM
84 workbench-libs-gl-gen-config: $(GENDIR)/config/gl.config
86 $(GENDIR)/config/gl.config: $(SRCDIR)/$(CURDIR)/gl.config
87         @$(ECHO) "Generating GL.library config file..."
88         @$(CP) $< $@
90 #MM
91 workbench-libs-gl-setup:
92         %mkdirs_q $(GENDIR)/$(CURDIR)/include/clib $(GENDIR)/$(CURDIR)/include/defines $(GENDIR)/$(CURDIR)/include/inline $(GENDIR)/$(CURDIR)/include/proto
94 %common