File: Makefile

package info (click to toggle)
euslisp 9.31%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 55,448 kB
  • sloc: ansic: 41,610; lisp: 3,339; makefile: 286; sh: 238; asm: 138; python: 53
file content (48 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
GCC_MACHINE=$(shell gcc -dumpmachine)
$(info "-- GCC_MACHINE = ${GCC_MACHINE}")
ifeq ($(shell echo $(GCC_MACHINE) | sed 's/.*-\(.*\)-.*/\1/'), linux)
  OS=Linux
else ifeq ($(shell echo $(GCC_MACHINE) | sed 's/.*-.*-\([a-zA-Z]*\).*/\1/'), darwin)
  OS=Darwin
else ifeq ($(shell echo $(GCC_MACHINE) | sed 's/.*-.*-\(.*\)/\1/'), cygwin)
  OS=Cygwin
endif
$(info "--      OS = ${OS}")
ifeq ($(OS),Linux)
 export MAKEFILE=Makefile.Linux
endif
ifeq ($(OS),CYGWIN)
 export MAKEFILE=Makefile.Cygwin
endif
ifeq ($(OS),Darwin)
 export MAKEFILE=Makefile.Darwin
endif

$(info "-- MAKEFILE = ${MAKEFILE}")

# set EUSDIR if not defined
export EUSDIR?=$(CURDIR)/..
$(info "--  EUSDIR = ${EUSDIR}")

include $(MAKEFILE)

SRC=test_foreign.c
OBJ=$(basename $(SRC)).o
LIB=$(basename $(SRC)).$(LSFX)

$(LIB): $(OBJ)
	$(LD) $(SOFLAGS) $(OUTOPT)$(LIB) $(OBJ) $(LDFLAGS)
	@echo "Try make test"

$(OBJ): $(SRC)
	$(CC) $(CFLAGS) -DCOMPILE_LIB -c $(SRC) $(OBJOPT)$(OBJ)

clean:
	rm -f $(LIB) $(OBJ)

test: $(LIB)
	teusgl eus64-test.l

clean :
	\rm -f *.o *.so