forked from Xpndable/DotUI
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use consistent makefiles across project
- Loading branch information
Showing
20 changed files
with
368 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
.PHONY: all | ||
.PHONY: clean | ||
|
||
TARGET=batmon | ||
|
||
########################################################### | ||
|
||
ifeq (,$(CROSS_COMPILE)) | ||
$(error missing CROSS_COMPILE for this toolchain) | ||
endif | ||
|
||
TARGET = batmon | ||
########################################################### | ||
|
||
ifeq ($(DEBUG), 1) | ||
CFLAGS = -ggdb3 -Og -DDEBUG | ||
else | ||
CFLAGS = -Os -DNDEBUG | ||
ifneq ($(PROFILE), 1) | ||
CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -s | ||
endif | ||
endif | ||
|
||
CC = $(CROSS_COMPILE)gcc | ||
CFLAGS = -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7ve | ||
LDFLAGS = -lSDL -lSDL_image -lpthread | ||
LIBS = -lSDL -lSDL_image -lpthread | ||
|
||
CFLAGS += -Wall -marm -march=armv7ve+simd -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard | ||
CFLAGS += -flto -fipa-pta -fipa-ra -ftree-vectorize -ffast-math -funsafe-math-optimizations | ||
CFLAGS += -fno-math-errno -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 | ||
CFLAGS += $(LIBS) | ||
|
||
all: | ||
$(CC) $(TARGET).c -o $(TARGET) $(CFLAGS) $(LDFLAGS) | ||
$(CC) $(TARGET).c -o $(TARGET) $(CFLAGS) | ||
|
||
clean: | ||
rm -f $(TARGET) | ||
rm -f $(TARGET) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
.PHONY: all | ||
.PHONY: clean | ||
|
||
TARGET=blank | ||
|
||
########################################################### | ||
|
||
ifeq (,$(CROSS_COMPILE)) | ||
$(error missing CROSS_COMPILE for this toolchain) | ||
endif | ||
|
||
TARGET = blank | ||
########################################################### | ||
|
||
ifeq ($(DEBUG), 1) | ||
CFLAGS = -ggdb3 -Og -DDEBUG | ||
else | ||
CFLAGS = -Os -DNDEBUG | ||
ifneq ($(PROFILE), 1) | ||
CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -s | ||
endif | ||
endif | ||
|
||
CC = $(CROSS_COMPILE)gcc | ||
CFLAGS = -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7ve | ||
LDFLAGS = | ||
|
||
CFLAGS += -Wall -marm -march=armv7ve+simd -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard | ||
CFLAGS += -flto -fipa-pta -fipa-ra -ftree-vectorize -ffast-math -funsafe-math-optimizations | ||
CFLAGS += -fno-math-errno -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 | ||
|
||
all: | ||
$(CC) main.c -o $(TARGET) $(CFLAGS) $(LDFLAGS) | ||
$(CC) $(TARGET).c -o $(TARGET) $(CFLAGS) | ||
|
||
clean: | ||
rm -f $(TARGET) | ||
rm -f $(TARGET) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
.PHONY: all | ||
.PHONY: clean | ||
|
||
TARGET=clock | ||
|
||
########################################################### | ||
|
||
ifeq (,$(CROSS_COMPILE)) | ||
$(error missing CROSS_COMPILE for this toolchain) | ||
endif | ||
|
||
TARGET = clock | ||
########################################################### | ||
|
||
ifeq ($(DEBUG), 1) | ||
CFLAGS = -ggdb3 -Og -DDEBUG | ||
else | ||
CFLAGS = -Os -DNDEBUG | ||
ifneq ($(PROFILE), 1) | ||
CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -s | ||
endif | ||
endif | ||
|
||
CC = $(CROSS_COMPILE)gcc | ||
CFLAGS = -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7ve | ||
LDFLAGS = -lSDL -lSDL_image | ||
LIBS = -lSDL -lSDL_image | ||
|
||
CFLAGS += -Wall -marm -march=armv7ve+simd -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard | ||
CFLAGS += -flto -fipa-pta -fipa-ra -ftree-vectorize -ffast-math -funsafe-math-optimizations | ||
CFLAGS += -fno-math-errno -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 | ||
CFLAGS += $(LIBS) | ||
|
||
all: | ||
$(CC) main.c -o $(TARGET) $(CFLAGS) $(LDFLAGS) | ||
$(CC) $(TARGET).c -o $(TARGET) $(CFLAGS) | ||
|
||
clean: | ||
rm -f $(TARGET) | ||
rm -f $(TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
.PHONY: all | ||
.PHONY: clean | ||
|
||
TARGET=confirm | ||
|
||
########################################################### | ||
|
||
ifeq (,$(CROSS_COMPILE)) | ||
$(error missing CROSS_COMPILE for this toolchain) | ||
endif | ||
|
||
TARGET = confirm | ||
########################################################### | ||
|
||
ifeq ($(DEBUG), 1) | ||
CFLAGS = -ggdb3 -Og -DDEBUG | ||
else | ||
CFLAGS = -Os -DNDEBUG | ||
ifneq ($(PROFILE), 1) | ||
CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -s | ||
endif | ||
endif | ||
|
||
CC = $(CROSS_COMPILE)gcc | ||
CFLAGS = -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7ve | ||
LDFLAGS = | ||
|
||
CFLAGS += -Wall -marm -march=armv7ve+simd -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard | ||
CFLAGS += -flto -fipa-pta -fipa-ra -ftree-vectorize -ffast-math -funsafe-math-optimizations | ||
CFLAGS += -fno-math-errno -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 | ||
|
||
all: | ||
$(CC) main.c -o $(TARGET) $(CFLAGS) $(LDFLAGS) | ||
$(CC) $(TARGET).c -o $(TARGET) $(CFLAGS) | ||
|
||
clean: | ||
rm -f $(TARGET) | ||
rm -f $(TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
.PHONY: all | ||
.PHONY: clean | ||
|
||
TARGET=keyboard | ||
|
||
########################################################### | ||
|
||
ifeq (,$(CROSS_COMPILE)) | ||
$(error missing CROSS_COMPILE for this toolchain) | ||
endif | ||
|
||
TARGET = keyboard | ||
########################################################### | ||
|
||
ifeq ($(DEBUG), 1) | ||
CFLAGS = -ggdb3 -Og -DDEBUG | ||
else | ||
CFLAGS = -Os -DNDEBUG | ||
ifneq ($(PROFILE), 1) | ||
CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -s | ||
endif | ||
endif | ||
|
||
CC = $(CROSS_COMPILE)gcc | ||
CFLAGS = -Os -marm -march=armv7ve+simd -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard | ||
CFLAGS += -Wall -ffunction-sections -fdata-sections -fmerge-all-constants -fno-stack-protector -fno-ident -fomit-frame-pointer | ||
CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops -fno-math-errno -ffast-math | ||
LDFLAGS = -lSDL -lSDL_image -lSDL_ttf -Wl,--gc-sections -s | ||
LIBS = -lSDL -lSDL_image -lSDL_ttf | ||
|
||
CFLAGS += -Wall -marm -march=armv7ve+simd -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard | ||
CFLAGS += -flto -fipa-pta -fipa-ra -ftree-vectorize -ffast-math -funsafe-math-optimizations | ||
CFLAGS += -fno-math-errno -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 | ||
CFLAGS += $(LIBS) | ||
|
||
all: | ||
$(CC) keyboard.c -o $(TARGET) $(CFLAGS) $(LDFLAGS) | ||
$(CC) $(TARGET).c -o $(TARGET) $(CFLAGS) | ||
|
||
clean: | ||
rm -f $(TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,35 @@ | ||
.PHONY: all | ||
.PHONY: clean | ||
|
||
TARGET=keymon | ||
|
||
########################################################### | ||
|
||
ifeq (,$(CROSS_COMPILE)) | ||
$(error missing CROSS_COMPILE for this toolchain) | ||
endif | ||
|
||
########################################################### | ||
|
||
ifeq ($(DEBUG), 1) | ||
CFLAGS = -ggdb3 -Og -DDEBUG | ||
else | ||
CFLAGS = -Os -DNDEBUG | ||
ifneq ($(PROFILE), 1) | ||
CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -s | ||
endif | ||
endif | ||
|
||
CC = $(CROSS_COMPILE)gcc | ||
FLAGS = -Os -lmsettings -lpthread -lrt -ldl -Wl,--gc-sections -s | ||
LIBS = -lmsettings -lpthread -lrt -ldl | ||
|
||
CFLAGS += -Wall -marm -march=armv7ve+simd -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard | ||
CFLAGS += -flto -fipa-pta -fipa-ra -ftree-vectorize -ffast-math -funsafe-math-optimizations | ||
CFLAGS += -fno-math-errno -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 | ||
CFLAGS += $(LIBS) | ||
|
||
all: | ||
$(CC) keymon.c -o keymon $(FLAGS) | ||
$(CC) $(TARGET).c -o $(TARGET) $(CFLAGS) | ||
|
||
clean: | ||
rm -rf keymon | ||
rm -f $(TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,54 @@ | ||
.PHONY: all | ||
.PHONY: clean | ||
|
||
TARGET=msettings | ||
|
||
########################################################### | ||
|
||
ifeq (,$(PLATFORM)) | ||
PLATFORM=$(UNION_PLATFORM) | ||
endif | ||
ifeq (,$(PLATFORM)) | ||
$(error please specify PLATFORM, eg. make PLATFORM=trimui) | ||
endif | ||
ifeq (,$(CROSS_COMPILE)) | ||
$(error missing CROSS_COMPILE for this toolchain) | ||
endif | ||
ifeq (,$(PREFIX)) | ||
$(error missing PREFIX for this toolchain) | ||
$(error missing PREFIX for installation in toolchain) | ||
endif | ||
|
||
TARGET=msettings | ||
########################################################### | ||
|
||
.PHONY: build | ||
.PHONY: clean | ||
ifeq ($(DEBUG), 1) | ||
CFLAGS = -ggdb3 -Og -DDEBUG | ||
else | ||
CFLAGS = -Os -DNDEBUG | ||
ifneq ($(PROFILE), 1) | ||
CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -s | ||
endif | ||
endif | ||
|
||
CC = $(CROSS_COMPILE)gcc | ||
|
||
SYSROOT := $(shell $(CC) --print-sysroot) | ||
|
||
SYSROOT := $(shell $(CC) --print-sysroot) | ||
INCLUDEDIR = $(SYSROOT)/usr/include | ||
CFLAGS = -I$(INCLUDEDIR) | ||
LDFLAGS = -lcam_os_wrapper -lmi_sys -lmi_ao -ldl -lrt -s -lm | ||
LIBS = -lcam_os_wrapper -lmi_sys -lmi_ao -lm -ldl -lrt | ||
|
||
CFLAGS += -Wall -marm -march=armv7ve+simd -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard | ||
CFLAGS += -flto -fipa-pta -fipa-ra -ftree-vectorize -ffast-math -funsafe-math-optimizations | ||
CFLAGS += -fno-math-errno -fno-unwind-tables -fno-asynchronous-unwind-tables | ||
CFLAGS += -I$(INCLUDEDIR) -DPLATFORM_$(shell echo $(PLATFORM) | tr a-z A-Z) -std=gnu99 | ||
CFLAGS += -Wl,--no-as-needed | ||
LDFLAGS = $(CFLAGS) $(LIBS) | ||
|
||
OPTM=-Ofast | ||
all: | ||
$(CC) -c -fpic $(TARGET).c $(CFLAGS) | ||
$(CC) -shared -o lib$(TARGET).so $(TARGET).o $(LDFLAGS) | ||
cp $(TARGET).h $(PREFIX)/include | ||
cp lib$(TARGET).so $(PREFIX)/lib | ||
|
||
build: | ||
$(CC) -c -Werror -fpic "$(TARGET).c" -Wl,--no-as-needed $(LDFLAGS) | ||
$(CC) -shared -o "lib$(TARGET).so" "$(TARGET).o" $(LDFLAGS) | ||
cp "$(TARGET).h" "$(PREFIX)/include" | ||
cp "lib$(TARGET).so" "$(PREFIX)/lib" | ||
clean: | ||
rm -f *.o | ||
rm -f "lib$(TARGET).so" | ||
rm -f $(TARGET).o | ||
rm -f lib$(TARGET).so | ||
rm -f $(PREFIX)/include/$(TARGET).h | ||
rm -f $(PREFIX)/lib/lib$(TARGET).so | ||
rm -f $(PREFIX)/lib/lib$(TARGET).so |
Oops, something went wrong.