git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial outline rendering.
[ipdf/code.git]
/
src
/
Makefile
diff --git
a/src/Makefile
b/src/Makefile
index
39f09ef
..
59e111b
100644
(file)
--- a/
src/Makefile
+++ b/
src/Makefile
@@
-1,32
+1,34
@@
#Makefile
CXX = g++ -std=gnu++0x -Wall -Werror -Wshadow -pedantic -g
#Makefile
CXX = g++ -std=gnu++0x -Wall -Werror -Wshadow -pedantic -g
-OBJ = log.o
-LIB = #-lSDL2
-DEPS := $(OBJ:%.o=%.d)
+OBJ = log.o main.o document.o view.o screen.o
+LIB = `sdl2-config --libs` -lGL
+OBJPATHS = $(OBJ:%=../obj/%)
+DEPS := $(OBJPATHS:%.o=%.d)
+CFLAGS += `sdl2-config --cflags`
-LINKOBJ = $(OBJ)
+LINKOBJ = $(OBJ
PATHS
)
RM = rm -f
RM = rm -f
-BIN = ipdf
+BIN =
../bin/
ipdf
-all : $(BIN)
-$(BIN) : $(LINKOBJ) main.o
- $(CXX) -o $(BIN) main.o $(LINKOBJ) $(LIB)
+all : $(BIN)
-%.o : %.cpp
- $(CXX) -c -MMD -o $@ $<
+$(BIN) : $(LINKOBJ)
+ @mkdir -p $(dir $@)
+ $(CXX) -o $(BIN) $(LINKOBJ) $(LIB)
-no_main : $(OBJ)
+../obj/%.o : %.cpp
+ @mkdir -p $(dir $@)
+ $(CXX) $(CFLAGS) -c -MMD -o $@ $<
-main.o : main.cpp
- $(CXX) -c main.cpp
+-include $(DEPS)
clean :
clean :
- $(RM) $(BIN) $(
OBJ) $(LINKOBJ) main.o
+ $(RM) $(BIN) $(
DEPS) $(LINKOBJ)
clean_full: #cleans up all backup files
clean_full: #cleans up all backup files
- $(RM) $(BIN) $(
OBJ
) $(LINKOBJ)
+ $(RM) $(BIN) $(
DEPS
) $(LINKOBJ)
$(RM) *.*~
$(RM) *~
$(RM) *.o
$(RM) *.*~
$(RM) *~
$(RM) *.o
UCC
git Repository :: git.ucc.asn.au