demosystem
[andemo] / Makefile
index 163f01f..fa01441 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,11 @@ dbg = -g
 #opt = -O3 -ffast-math -fno-strict-aliasing
 def = -DMINIGLUT_USE_LIBC -DGLEW_STATIC
 incdir = -Isrc -Ilibs -Ilibs/imago/src -Ilibs/treestore -Ilibs/glew
-libdir = -Llibs/unix
+libs_path = libs/unix
+libdir = -L$(libs_path)
+
+libs = $(libs_path)/libimago.a $(libs_path)/libtreestore.a $(libs_path)/libanim.a \
+          $(libs_path)/libpsys.a
 
 CFLAGS = $(warn) $(dbg) $(opt) $(def) $(incdir) -fcommon -MMD
 LDFLAGS = $(libdir) $(libsys) $(libgl) -limago -lpsys -lanim -ltreestore $(libc)
@@ -19,14 +23,14 @@ ifeq ($(sys), mingw)
        bin = demo.exe
        libgl = -lopengl32
        libsys = -lmingw32 -lgdi32 -lwinmm -mconsole
-       libdir = -Llibs/w32
+       libs_path = libs/w32
        libc = -lm
 else
        libgl = -lGL -lX11 -lXext
        libc = -lm -ldl
 endif
 
-$(bin): $(obj) Makefile
+$(bin): $(obj) Makefile $(libs)
        $(CC) -o $@ $(obj) $(LDFLAGS)
 
 -include $(dep)