zlgopen / awtk-linux-fb

awtk port for linux framebuffer
108 stars 49 forks source link

new feature request SConstruct to Makefile #97

Open fatalfeel opened 1 year ago

fatalfeel commented 1 year ago

this is my Makefile for x64 and arm32

TARGET = asm_test

CROSS_COMPILE =

CROSS_COMPILE = /opt/ivot/arm-ca9-linux-gnueabihf-6.5/bin/arm-ca9-linux-gnueabihf- CXX = $(CROSS_COMPILE)g++

CXXFLAGS = -O0 -g -fPIC -Wall -fmessage-length=0 -std=c++14 -pthread -fopenmp LDFLAGS = -lgcov -lpthread COMPILE_DIR = ./objs

$(COMPILE_DIR)/%.o : ./%.cpp @mkdir -p $(@D) $(CXX) $(CXXFLAGS) -c $< -o $@

SRC = $(notdir $(wildcard ./*.cpp)) OBJ = $(patsubst %.cpp,$(COMPILE_DIR)/%.o,$(SRC))

$(TARGET) : $(OBJ) $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)

all: $(TARGET)

clean: rm -rf $(COMPILE_DIR) $(TARGET)

################################################### could SConstruct to Makefile it is more easier to compile

fatalfeel commented 1 year ago

prototype https://www.mediafire.com/file/a9i1rzzknqqhqvx/test_submake.tar.gz

i will do it later and then share Makefile version