modified: SpatialOmicsCoord.py
[GalaxyCodeBases.git] / c_cpp / pthreadtest / Makefile
blob3be20f006af9ba7341fecb2bb072f1e9aa254463
1 # learned from http://sourceforge.net/projects/gcmakefile/
2 # The options used in linking as well as in any direct use of ld.
3 LDLIB = -lpthread
5 LDFLAGS = -Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,--hash-style=both $(LDLIB)
6 # The directories in which source files reside.
7 # If not specified, only the current directory will be serached.
8 SRCDIRS =
10 ## Implicit Section: change the following only when necessary.
11 ##==========================================================================
13 # The source file types (headers excluded).
14 # .c indicates C source files, and others C++ ones.
15 SRCEXTS = .c# .C .cc .cpp .CPP .c++ .cxx .cp
17 OLevel= -O3
18 CFLAGS = -pipe -march=core2 -mtune=generic# -std=gnu99
19 WARNFLAGS = -Wfloat-equal -Wall \
20 #-pedantic
22 ASMFLAGS = -S -fverbose-asm -g -masm=intel
24 ifeq ($(SRCDIRS),)
25 SRCDIRS = .
26 endif
28 SOURCES = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(SRCEXTS))))
30 .PHONY: all clean
32 all: $(SOURCES:.c=)
33 #$(patsubst $.c,%,$(SOURCES))
34 @echo [@gcc $(CFLAGS) $(OLevel) $(LDFLAGS)]
35 #@echo [$(SOURCES)] to [$(SOURCES:.c=)].
37 %: %.c
38 @mkdir -p asm
39 @echo [$(OLevel)]:${<} -\> ${@}
40 @gcc $(WARNFLAGS) $(CFLAGS) $(OLevel) $(LDFLAGS) -o $@ $<
41 @gcc $(CFLAGS) $(OLevel) $(LDFLAGS) $(ASMFLAGS) -o ./asm/$@.s $<
42 @as -alhnd ./asm/$@.s > ./asm/$@.asm
43 #@gcc $(CFLAGS) $(OLevel) $(LDFLAGS) $(ASMFLAGS) -o - $< | as -alhnd > ./asm/$@.asm
44 @rm ./asm/$@.s
46 ./11locktest: override OLevel +=
48 clean:
49 -rm $(SOURCES:.c=)
50 -rm -frv ./asm