Implement CMake to optimize cross-compilation support #1
5
.gitignore
vendored
5
.gitignore
vendored
@ -15,6 +15,7 @@
|
|||||||
# Precompiled Headers
|
# Precompiled Headers
|
||||||
*.gch
|
*.gch
|
||||||
*.pch
|
*.pch
|
||||||
|
src/config.h
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
*.lib
|
*.lib
|
||||||
@ -41,7 +42,7 @@
|
|||||||
*.su
|
*.su
|
||||||
*.idb
|
*.idb
|
||||||
*.pdb
|
*.pdb
|
||||||
testfiles/
|
samples/
|
||||||
|
|
||||||
# Kernel Module Compile Results
|
# Kernel Module Compile Results
|
||||||
*.mod*
|
*.mod*
|
||||||
@ -59,5 +60,3 @@ Release/
|
|||||||
.cproject
|
.cproject
|
||||||
.project
|
.project
|
||||||
*.launch
|
*.launch
|
||||||
|
|
||||||
src/config.h
|
|
33
Makefile.old
33
Makefile.old
@ -1,33 +0,0 @@
|
|||||||
CC=gcc
|
|
||||||
#CFLAGS= -Wextra -Wall -O0 -g
|
|
||||||
CFLAGS= -Wall -O3
|
|
||||||
LDFLAGS= -lz -lpng
|
|
||||||
|
|
||||||
TARGET=RSE-Texture
|
|
||||||
VERSION=1.0b
|
|
||||||
SRC_DIR=src
|
|
||||||
SRC= $(wildcard $(SRC_DIR)/*.c)
|
|
||||||
INCLUDES=-I$(SRC_DIR)
|
|
||||||
BUILD_DIR=obj
|
|
||||||
OBJS= $(subst src,$(BUILD_DIR),$(SRC:%.c=%.o))
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: $(BUILD_DIR) all clean
|
|
||||||
|
|
||||||
|
|
||||||
all: clean $(BUILD_DIR) $(TARGET)
|
|
||||||
|
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: src/%.c
|
|
||||||
$(CC) $(INCLUDES) -DVERSION='"$(VERSION)"' -c -o $@ $< $(CFLAGS)
|
|
||||||
|
|
||||||
$(BUILD_DIR):
|
|
||||||
@mkdir -p $(BUILD_DIR)
|
|
||||||
|
|
||||||
$(TARGET): $(OBJS)
|
|
||||||
$(CC) -o $@_$(VERSION) $^ $(LDFLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@rm -rf $(BUILD_DIR)
|
|
||||||
@rm -f RSE-*
|
|
Loading…
x
Reference in New Issue
Block a user