summaryrefslogtreecommitdiff
path: root/utility/demo-fw/pc-tools/CreateDemoBin/Makefile
blob: 786da50518d0027498f94f60d71bf37a84c858a6 (plain)
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
63
64
65
66
67
68
69
# Output directories
BIN = bin
OBJ = obj

# Compiler
CC = g++

# Optimization level
OPT = 

# Flags
INCLUDES = -I include  
INCLUDES += -I lib/EasyBMP
INCLUDES += -I lib/regex

CXXFLAGS =	$(OPT) -g -Wall 
CXXFLAGS += -D DEBUG_PROPSECTION
CXXFLAGS += -D DEBUG_DISPSECTION
CXXFLAGS += -D DEBUG_SLIDESECTION
CXXFLAGS += -D DEBUG_LINKSECTION
CXXFLAGS += -D DEBUG_CONVBMPINFO
CXXFLAGS += -D DEBUG_BEFOREPARSE
CXXFLAGS += -D DEBUG_AFTERPARSE

# Movie flas
ifeq ($(MOVIE_MERGE), on)
CXXFLAGS += -D MOVIE_MERGE_on
endif

LDFLAGS = $(OPT) 

# VPATH to search source
VPATH += ./src
VPATH += ./lib/EasyBMP

# Objects
OBJS += main.o
OBJS += ScriptParse.o
OBJS += EasyBMP.o
OBJS += CreateDemoBin.o

C_OBJECTS = $(addprefix $(OBJ)/, $(OBJS))

LIBS = lib/libregex.a

# Source code

# Output target
ifeq ($(MOVIE_MERGE), on)
TARGET =    CreateMovieBin.exe
else
TARGET =    CreateDemoBin.exe
endif

# Make target
.PHONY: all
all:	 $(BIN) $(OBJ) $(TARGET)
	
$(BIN) $(OBJ): 
	mkdir $@
	
$(OBJS): %.o: %.cpp
	$(CC) -c $(CXXFLAGS) $(INCLUDES) $< -o $(OBJ)/$@
	
$(TARGET):	$(OBJS)
	$(CC) $(LDFLAGS) -o $(BIN)/$(TARGET) $(C_OBJECTS) $(LIBS)

clean:
	-rm -f $(OBJ)/*.o $(BIN)/$(TARGET)
personal git repositories of Harald Welte. Your mileage may vary