-
Notifications
You must be signed in to change notification settings - Fork 92
/
makefile.old
executable file
·62 lines (47 loc) · 1.47 KB
/
makefile.old
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
VPATH=../src
TARGA=../Targa
GLI=../../gli
CPPFLAGS=-g -Wall -O3 -fopenmp -I$(TARGA) -I$(GLI) -I ../src -I../src/texture_tile_blend -DENABLE_JPEG -DENABLE_PNG -DENABLE_TIFF -DENABLE_DDS
TARGET=../obj/3dworld
OBJS=$(shell cat ../obj_list)
CPP=g++
#LINK=$(CPP) $(CPPFLAGS) -lz -lpng -lpthread -L/usr/X11R6/lib64 -lglut -lGL -lGLU
LINK=$(CPP) $(CPPFLAGS)
LFLAGS=-lz -lpng -ljpeg -ltiff -lpthread $(shell pkg-config --libs xrender) -lglut -lGLEW -lGLU -lGL -lopenal -lalut
# In most cases, you should not change anything below this line.
ifeq ($(shell test -L makefile ; echo $$? ),1)
all :
@echo "makefile should be a symbolic link to avoid accidentally building in the src directory ... attempting to create ../obj,../lib,../run, symlink makefile in ../obj, and recurse make into ../obj"
-mkdir ../obj
-mkdir ../run
-ln -s ../makefile ../obj/makefile
cd ../obj && $(MAKE)
else
# disable old-style .SUFFIXES rules. this may not be needed?
.SUFFIXES:
%.o : %.C
$(CPP) $(CPPFLAGS) -MMD -c $<
%.o : %.cc
$(CPP) $(CPPFLAGS) -MMD -c $<
%.o : %.cpp
$(CPP) $(CPPFLAGS) -MMD -c $<
%.d: %.C
touch $@
%.d: %.cc
touch $@
%.d: %.cpp
touch $@
DEPENDENCIES = $(OBJS:.o=.d)
#
# Targets:
#
all : $(TARGET)
$(TARGET): $(OBJS)
$(LINK) $(FLAGS) -o $(TARGET) $(OBJS) $(LFLAGS)
.PHONY : clean
clean:
-rm -f $(TARGET) $(OBJS) $(DEPENDENCIES) make.dep
make.dep: $(DEPENDENCIES)
-cat $(DEPENDENCIES) > make.dep
include make.dep
endif