forked from pyrite-dev/milsko
fix
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@175 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
68b42f65af
commit
fd680514af
1 changed files with 8 additions and 6 deletions
14
GNUmakefile
14
GNUmakefile
|
|
@ -72,16 +72,18 @@ GL = -lGL -lGLU
|
||||||
|
|
||||||
E_LIBS += -lm
|
E_LIBS += -lm
|
||||||
|
|
||||||
|
LIB = lib
|
||||||
SO = .so
|
SO = .so
|
||||||
EXEC =
|
EXEC =
|
||||||
else ifeq ($(WINDOWS),1)
|
else ifeq ($(WINDOWS),1)
|
||||||
L_CFLAGS += -DUSE_GDI
|
L_CFLAGS += -DUSE_GDI
|
||||||
L_LDFLAGS += -Wl,--out-implib,src/libMw.lib -static-libgcc
|
L_LDFLAGS += -Wl,--out-implib,src/libMw.a -static-libgcc
|
||||||
L_OBJS += src/backend/gdi.o
|
L_OBJS += src/backend/gdi.o
|
||||||
L_LIBS += -lgdi32
|
L_LIBS += -lgdi32
|
||||||
|
|
||||||
GL = -lopengl32 -lglu32
|
GL = -lopengl32 -lglu32
|
||||||
|
|
||||||
|
LIB =
|
||||||
SO = .dll
|
SO = .dll
|
||||||
EXEC = .exe
|
EXEC = .exe
|
||||||
endif
|
endif
|
||||||
|
|
@ -101,20 +103,20 @@ endif
|
||||||
.PHONY: all format clean lib examples
|
.PHONY: all format clean lib examples
|
||||||
|
|
||||||
all: lib examples
|
all: lib examples
|
||||||
lib: src/libMw$(SO)
|
lib: src/$(LIB)Mw$(SO)
|
||||||
examples: $(EXAMPLES)
|
examples: $(EXAMPLES)
|
||||||
|
|
||||||
format:
|
format:
|
||||||
clang-format --verbose -i `find src include examples tools "(" -name "*.c" -or -name "*.h" ")" -and -not -name "stb_*.h"`
|
clang-format --verbose -i `find src include examples tools "(" -name "*.c" -or -name "*.h" ")" -and -not -name "stb_*.h"`
|
||||||
perltidy -b -bext='/' --paren-tightness=2 `find tools -name "*.pl"`
|
perltidy -b -bext='/' --paren-tightness=2 `find tools -name "*.pl"`
|
||||||
|
|
||||||
src/libMw$(SO): $(L_OBJS)
|
src/$(LIB)Mw$(SO): $(L_OBJS)
|
||||||
$(CC) $(L_LDFLAGS) -shared -o $@ $^ $(L_LIBS)
|
$(CC) $(L_LDFLAGS) -shared -o $@ $^ $(L_LIBS)
|
||||||
|
|
||||||
examples/gl%$(EXEC): examples/gl%.o src/libMw$(SO)
|
examples/gl%$(EXEC): examples/gl%.o src/$(LIB)Mw$(SO)
|
||||||
$(CC) $(E_LDFLAGS) -o $@ $< $(E_LIBS) $(GL)
|
$(CC) $(E_LDFLAGS) -o $@ $< $(E_LIBS) $(GL)
|
||||||
|
|
||||||
examples/%$(EXEC): examples/%.o src/libMw$(SO)
|
examples/%$(EXEC): examples/%.o src/$(LIB)Mw$(SO)
|
||||||
$(CC) $(E_LDFLAGS) -o $@ $< $(E_LIBS)
|
$(CC) $(E_LDFLAGS) -o $@ $< $(E_LIBS)
|
||||||
|
|
||||||
src/%.o: src/%.c
|
src/%.o: src/%.c
|
||||||
|
|
@ -124,4 +126,4 @@ examples/%.o: examples/%.c
|
||||||
$(CC) $(E_CFLAGS) -c -o $@ $<
|
$(CC) $(E_CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f src/*.dll src/*.so src/*.a src/*.lib */*.o */*/*.o examples/*.exe $(EXAMPLES) examples/opengl examples/vulkan
|
rm -f src/*.dll src/*.so src/*.a */*.o */*/*.o examples/*.exe $(EXAMPLES) examples/opengl examples/vulkan
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue