File: Makefile

package info (click to toggle)
wmxres 1.2-10.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 244 kB
  • ctags: 66
  • sloc: ansic: 407; makefile: 69
file content (41 lines) | stat: -rw-r--r-- 1,009 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
# Edited for Debian GNU/Linux
DESTDIR = 

CC		=	gcc
CFLAGS 		=	-O2 -Wall -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
FINAL_CFLAGS 		=	-O2 -Wall -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wl,-z,norelro
DEBUG_CFLAGS	=	-g -Wall
INCDIR		=	-I/usr/X11R6/include
LIBDIR		=	-L/usr/X11R6/lib
LIBS		=	-lXpm -lXext -lX11 -lXxf86vm
OBJS		=	wmxres/wmxres.o \
			wmgeneral/wmgeneral.o \

# ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
# CFLAGS += -g
# endif

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  INSTALL_FLAGS += -s
endif

.c.o:
	cc -c $(CFLAGS) -D$(shell echo `uname -s`) $< -o $*.o $(INCDIR)

all: wmxres/wmxres

wmxres/wmxres: $(OBJS) 
	gcc $(CFLAGS) -o wmxres/wmxres $^ $(LIBDIR) $(LIBS)

debug:  $(OBJS)
	gcc $(DEBUG_CFLAGS) -o wmxres/wmxres $^ $(LIBDIR) $(LIBS)
install:: all
	install $(INSTALL_FLAGS) -m 4755 -o root wmxres/wmxres \
          $(DESTDIR)/usr/bin

.PHONY :clean
clean:
	for i in $(OBJS) ; do \
		rm -f $$i; \
	done
	rm -f wmxres/wmxres