aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile8
-rw-r--r--Makefile.inc11
2 files changed, 9 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index f375a6ae..ee5c1138 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,8 @@
TARGET:=usdx
-TOP:=.
+include Makefile.inc
-headers:=$(wildcard ${TOP}/src/*.hpp)
-sources:=$(wildcard ${TOP}/src/*.cpp)
-
-include ${TOP}/Makefile.inc
+headers+=$(wildcard src/*.hpp)
+sources+=$(wildcard src/*.cpp)
##############################################################################
diff --git a/Makefile.inc b/Makefile.inc
index bc56d6d9..661da8b8 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -1,10 +1,11 @@
# -*- mode: makefile -*-
+TOP:=$(dir $(lastword $(MAKEFILE_LIST)))
-headers+=$(wildcard $(TOP)/src/*/*.hpp) $(wildcard $(TOP)/src/*/*/*.hpp)
-sources+=$(wildcard $(TOP)/src/*/*.cpp) $(wildcard $(TOP)/src/*/*/*.cpp)
+headers+=$(wildcard $(TOP)src/*/*.hpp) $(wildcard $(TOP)src/*/*/*.hpp)
+sources+=$(wildcard $(TOP)src/*/*.cpp) $(wildcard $(TOP)src/*/*/*.cpp)
-deps:=$(sources:.cpp=.d)
-objects:=$(sources:.cpp=.o)
+deps=$(sources:.cpp=.d)
+objects=$(sources:.cpp=.o)
# APPS
PKG_CONFIG:=pkg-config
@@ -13,7 +14,7 @@ LOG4CPP_CONFIG:=log4cpp-config
# CFLAGS
PEDENTIC:=-Wall -Werror
DEBUG:=-g
-INC_PATH:=-I$(TOP)/src
+INC_PATH:=-I$(TOP)src/
FTGL_CFLAGS:=$(shell $(PKG_CONFIG) ftgl --cflags)
# LDFLAGS