File: Makefile_linux

package info (click to toggle)
dxsamples 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 26,340 kB
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,102
file content (43 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download | duplicates (4)
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

FILES_HELLO = outboard.o hello.o 
FILES_ASYNC = outboard.o async.o 
FILES_WATCHFILE = outboard.o watchfile.o 
FILES_WATCHSOCKET = outboard.o watchsocket.o socket.o
FILES_MY_SIM = my_simulation.o socket.o


BASE = /usr/local/dx

CC = cc

CFLAGS   = -g -Dlinux -I. -I$(BASE)/include
LITELIBS = -L$(BASE)/lib_linux -lDXlite -lm -ldl

default:    hello async

all:    hello async watchfile watchsocket my_simulation

hello:	hello.o
	$(CC) $(CFLAGS) -DUSERMODULE=m_Hello -c $(BASE)/lib/outboard.c
	$(CC) $(FILES_HELLO) $(LITELIBS) -o hello
	rm outboard.o

watchfile: watchfile.o
	$(CC) $(CFLAGS) -DUSERMODULE=m_WatchFile -c $(BASE)/lib/outboard.c
	$(CC) $(FILES_WATCHFILE) $(LITELIBS) -o watchfile
	rm outboard.o

my_simulation: my_simulation.o socket.o
	$(CC) $(FILES_MY_SIM) $(LITELIBS) -lm -o my_simulation

watchsocket: watchsocket.o socket.o
	$(CC) $(CFLAGS) -DUSERMODULE=m_WatchSocket -c $(BASE)/lib/outboard.c
	$(CC) $(FILES_WATCHSOCKET) $(LITELIBS) -lm -o watchsocket

both: watchsocket my_simulation

async: async.o
	$(CC) $(CFLAGS) -DUSERMODULE=m_Async -c $(BASE)/lib/outboard.c
	$(CC) $(FILES_ASYNC) $(LITELIBS) -o async
	rm outboard.o