12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- subdirs = native apps
- SYS ?= $(shell gcc -dumpmachine)
- export SYS
- CC = gcc
- CXX = g++
- CFLAGS = -std=gnu99 -I$(level)../include
- CFLAGS-debug = $(CFLAGS) -I$(level)../../../Pal/lib \
- -I$(level)../../../Pal/include/pal
- LDFLAGS =
- LDFLAGS-debug = $(LDFLAGS) -L$(level)../src -L$(level)../../../Pal/src \
- -Wl,-rpath-link=$(abspath $(LEVEL)../src) \
- -Wl,-rpath-link=$(abspath $(level)../../../Pal/src) \
- -lpal -lsysdb_debug
- include $(level)../../../Pal/src/Makefile.Test
- libs = $(level)../src/libsysdb_debug.so $(level)../../../Pal/src/libpal.so
- glibc_dir = $(level)../../build
- all: $(call expand_target,$(exec_target)) $(target) $(if $(level),,build-subdirs)
- debug: DEBUG=debug
- debug: CC=gcc -g
- debug: CXX=g++ -g
- debug: $(target) $(if $(level),,build-subdirs)
- pal:
- [ ! -f $(level)../../../Pal/src/pal ] || ln -sf $(level)../../../Pal/src/pal pal
- pal_sec:
- [ ! -f $(level)../../../Pal/src/pal_sec ] || ln -sf $(level)../../../Pal/src/pal_sec pal_sec
- .PHONY: test clean
- clean: $(clean-extra) $(if $(level),,clean-subdirs)
- rm -rf $(call expand_target,$(exec_target)) $(target)
- build-subdirs:
- for f in $(subdirs); do (cd $$f; $(MAKE) $(DEBUG); cd ..); done
- ifeq ($(SYS),x86_64-linux-gnu)
- ifeq ($(level),)
- .PHONY: pack
- pack:
- for f in $(subdirs); do (cd $$f; $(MAKE) pack; cd ..); done
- endif
- endif
- clean-subdirs:
- for f in $(subdirs); do (cd $$f; $(MAKE) clean; cd ..); done
|