-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (33 loc) · 756 Bytes
/
makefile
File metadata and controls
38 lines (33 loc) · 756 Bytes
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
VERSION=0.1.0
CFLAGS=-c -Wall -DVERSION=\"$(VERSION)\"
GNUSTEPFLAGS=`gnustep-config --objc-flags` `gnustep-config --objc-libs`
FRAMEWORKS= -framework Foundation
LDFLAGS=-lobjc -lm -lgnustep-base
OBJ = main.o MyPsychro.o Bridge.o Display.o psychrometrics.o
NAME = mypsychro
all : $(OBJ)
ifeq ($(TARGET),linux)
gcc -O2 -o $(NAME) $(OBJ) $(LDFLAGS)
else
clang -O2 -o $(NAME) $(OBJ) -fobjc-arc $(FRAMEWORKS)
endif
%.o: %.m
ifeq ($(TARGET),linux)
gcc $(GNUSTEPFLAGS) $(CFLAGS) $<
else
clang $(CFLAGS) $<
endif
psychrometrics.o : psychrometrics.cpp
ifeq ($(TARGET),linux)
g++ $(CFLAGS) $<
else
clang++ $(CFLAGS) $<
endif
.PHONY: test
test :
expect script.exp > output.txt
diff test.ok output.txt
.PHONY: clean
clean :
rm -f *.o
rm -f mypsychro