Soft'N'Design Software
/
projects
/
compress.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix types
[compress.git]
/
makefile
diff --git
a/makefile
b/makefile
index 15683ec6d21642a9051862afb8c42965fc65831f..49a8ae72b706b48c2250188f554624ba216e3985 100644
(file)
--- a/
makefile
+++ b/
makefile
@@
-6,12
+6,13
@@
INCLUDES = -I../debug -D__MEMORY_ALLOCATION__
#OFLAGS = -O4 -ffast-math -finline-functions
OFLAGS = -O4 -finline-functions
#OFLAGS += -mtune=pentium3 -mmmx -msse -msse2 -m3dnow
#OFLAGS = -O4 -ffast-math -finline-functions
OFLAGS = -O4 -finline-functions
#OFLAGS += -mtune=pentium3 -mmmx -msse -msse2 -m3dnow
-OFLAGS += -minline-all-stringops -fsingle-precision-constant
-OFLAGS += -malign-double
-CFLAGS += -Wall -Wextra -g
+
#
OFLAGS += -minline-all-stringops -fsingle-precision-constant
+
#
OFLAGS += -malign-double
+CFLAGS += -W
-W
all -Wextra -g
CFLAGS += -std=c99 -D_XOPEN_SOURCE=500
CFLAGS += $(OFLAGS) $(INCLUDES)
LDFLAGS += -g
CFLAGS += -std=c99 -D_XOPEN_SOURCE=500
CFLAGS += $(OFLAGS) $(INCLUDES)
LDFLAGS += -g
+LDFLAGS += -static-libgcc
# Targets
# Targets
@@
-45,7
+46,7
@@
all: depends
alltests: all
$(MAKE) $(addprefix test_,$(ALLEXE:%.exe=%))
alltests: all
$(MAKE) $(addprefix test_,$(ALLEXE:%.exe=%))
-depends: $(patsubst %.c, %.d, $(wildcard *.c))
+depends: $(patsubst %.c, %.d, $(wildcard *.c))
$(patsubst %, %.ld, $(ALLEXE))
count:
wc $(wildcard *.c *.h) $(MAKEFILE_LIST)
count:
wc $(wildcard *.c *.h) $(MAKEFILE_LIST)
@@
-53,7
+54,7
@@
count:
clean:
$(call TITLE, "Cleaning")
touch clean
clean:
$(call TITLE, "Cleaning")
touch clean
- rm -f clean $(wildcard *.d *.log *.o *.test *~ .exec_*)
+ rm -f clean $(wildcard *.d *.l
d *.l
og *.o *.test *~ .exec_*)
$(call PASS, SUCCESS)
purge: clean
$(call PASS, SUCCESS)
purge: clean
@@
-65,6
+66,7
@@
purge: clean
## Main rules
include $(wildcard *.d)
## Main rules
include $(wildcard *.d)
+include $(wildcard *.ld)
%.test: %.c
$(call TITLE, "Building $@")
%.test: %.c
$(call TITLE, "Building $@")
@@
-94,6
+96,11
@@
valgrind_%: %
mv $@~ $@
$(call PASS, SUCCESS)
mv $@~ $@
$(call PASS, SUCCESS)
+%.ld: %.c
+ $(call TITLE, "Building $@")
+ echo ${<:.c=.exe}: $(shell ./getcomments.pl -p='linker:\s' -f='%' $< | awk '{for (i=1;i<=NF;i++) if ($$(i) ~ /.o$$/) printf " %s", $$(i)}') >> $@
+ $(call PASS, SUCCESS)
+
%.o: %.c
$(call TITLE, "Building $@")
$(CC) $(CFLAGS) $(INCLUDES) $(shell ./getcomments.pl -p='cflags:\s' -f='%' $<) -c $< -o $@
%.o: %.c
$(call TITLE, "Building $@")
$(CC) $(CFLAGS) $(INCLUDES) $(shell ./getcomments.pl -p='cflags:\s' -f='%' $<) -c $< -o $@
@@
-102,9
+109,7
@@
valgrind_%: %
%.exe: %.o %.d
$(call TITLE, "Building $@")
%.exe: %.o %.d
$(call TITLE, "Building $@")
- $(CC) $(LDFLAGS) $(shell ./getcomments.pl -p='linker:\s' -f='%' ${<:.o=.c}) $< -o ${<:.o=}
- echo ${<:.o=} >> .targets
- #ln -sf ${<:.o=} $@
+ $(CC) $(LDFLAGS) $(shell ./getcomments.pl -p='linker:\s' -f='%' ${<:.o=.c}) $< -o $@
$(call PASS, SUCCESS)
## Phony
$(call PASS, SUCCESS)
## Phony